[ https://issues.apache.org/jira/browse/DERBY-2404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478344 ]
Kristian Waagan commented on DERBY-2404: ---------------------------------------- I tried the patch, and it works fine. However, would it be more appropriate to use the methods TestConfiguration.getPort and TestConfiguration.getHostName instead of the static fields for the default values? The reason I ask, is because if we make it possible to configure the port/hostname, the test will still use the defaults even though the user specified her own values. The modifiers were changed in revision 509693 (DERBY-2196; secure server test). I think we should check out if the server test really needs to use the defaults directly. If not, my opinion is that the two variables in TestConfiguration should be made private again. > BadConnectionTest.java hardcodes port 1527 > ------------------------------------------ > > Key: DERBY-2404 > URL: https://issues.apache.org/jira/browse/DERBY-2404 > Project: Derby > Issue Type: Bug > Components: Test > Affects Versions: 10.3.0.0 > Reporter: Dag H. Wanvik > Assigned To: Andrew McIntyre > Priority: Minor > Attachments: derby-2404-v1.diff > > > This test references port 1527; it should use the current test > configuration's method getPort instead, to make it possible to run > several tests on the same machine concurrently. > When I experimented and changed TestConfiguration.DEFAULT_PORT to > something else but 1527, running suites.All crashed in > BadConnectionTest.java, and also crashed the JUnit textui.TestRunner > with this message: "Couldn't get I/O for the connection to: > localhost". No failure explanation or stack trace was printed on the > console. Not sure why... > Running the test separately, the testrunner survived to show the > failures. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.