[
https://issues.apache.org/jira/browse/DERBY-6325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13754097#comment-13754097
]
Kathey Marsden commented on DERBY-6325:
---------------------------------------
It does look like the ping failed as expected but exitValue() returned 0.
It passes when I run 10.10 1.5 in my client
I wonder if this code in BaseTestCase needs a waitFor() instead of exitValue().
public static void assertExecJavaCmdAsExpected(String[] expectedString,
String[] cmd, int expectedExitValue) throws
InterruptedException,
IOException {
Process pr = execJavaCmd(cmd);
String output = readProcessOutput(pr);
int exitValue = pr.exitValue();
I will wait and see if it fails again.
> testPingWithBogusPort(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlClientCommandTest)junit.framework.AssertionFailedError:
> expectedExitValue:1 does not match exitValue:0
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-6325
> URL: https://issues.apache.org/jira/browse/DERBY-6325
> Project: Derby
> Issue Type: Bug
> Components: Network Server, Test
> Affects Versions: 10.1.3.2
> Environment: IBM 1.5 10.10 revison 1518442
> Reporter: Kathey Marsden
>
> Saw this in the nightlies
> http://people.apache.org/~myrnavl/derby_test_results/v10_10/windows/testlog/ibm15/1518442-suites.All_diff.txt
> 1)
> testPingWithBogusPort(org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlClientCommandTest)junit.framework.AssertionFailedError:
> expectedExitValue:1 does not match exitValue:0
> expected output strings:
> [0]Could not connect to Derby Network Server
> actual output:<STDOUT>Wed Aug 28 19:30:56 PDT 2013 : Could not connect to
> Derby Network Server on host localhost, port 3101: Connection refused: connect
> <END STDOUT>
> <STDERR><END STDERR>
> expected:<1> but was:<0>
> at
> org.apache.derbyTesting.junit.BaseTestCase.assertExecJavaCmdAsExpected(BaseTestCase.java:546)
> at
> org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlClientCommandTest.assertFailedPing(NetworkServerControlClientCommandTest.java:148)
> at
> org.apache.derbyTesting.functionTests.tests.derbynet.NetworkServerControlClientCommandTest.testPingWithBogusPort(NetworkServerControlClientCommandTest.java:126)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:117)
> at
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:442)
> at
> org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:459)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira