[
https://issues.apache.org/jira/browse/IGNITE-28597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18075885#comment-18075885
]
Dmitry Werner commented on IGNITE-28597:
----------------------------------------
Successful test run on JDK 17:
https://ci2.ignite.apache.org/buildConfiguration/IgniteTests24Java8_ThinClientJava/9028276
> FunctionalTest.testClientFailsOnStart fails under JDK 17
> --------------------------------------------------------
>
> Key: IGNITE-28597
> URL: https://issues.apache.org/jira/browse/IGNITE-28597
> Project: Ignite
> Issue Type: Test
> Reporter: Dmitry Werner
> Assignee: Dmitry Werner
> Priority: Major
> Labels: ise
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The tests are failing on the master branch with JDK 17:
> {code:java}
> ClientTestSuite: FunctionalTest.testClientFailsOnStart[useBinaryArrays = true]
> ClientTestSuite: FunctionalTest.testClientFailsOnStart[useBinaryArrays =
> false]{code}
> [https://ci2.ignite.apache.org/buildConfiguration/IgniteTests24Java8_ThinClientJava/9021948]
> The tests fail during the following assertion:
> {code:java}
> assertContains(log, expEx.getMessage(), Config.SERVER);{code}
> where Config.SERVER = "127.0.0.1:10800".
> The root cause of the failures on JDK 17 is a change in the logic of the
> method java.net.InetSocketAddress.InetSocketAddressHolder#toString.
> {code:java}
> java.net.InetSocketAddress.InetSocketAddressHolder#toString
> JDK 11:
> @Override
> public String toString() {
> if (isUnresolved()) {
> return hostname + ":" + port;
> } else {
> return addr.toString() + ":" + port;
> }
> }
> JDK 17:
> @Override
> public String toString() {
> String formatted;
> if (isUnresolved()) {
> formatted = hostname + "/<unresolved>";
> } else {
> formatted = addr.toString();
> if (addr instanceof Inet6Address) {
> int i = formatted.lastIndexOf("/");
> formatted = formatted.substring(0, i + 1)
> + "[" + formatted.substring(i + 1) + "]";
> }
> }
> return formatted + ":" + port;
> }{code}
> As a result, the test expects the string "127.0.0.1:10800", but the actual
> value in expEx.getMessage() contains the address
> "127.0.0.1/<unresolved>:10800".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)