[
https://issues.apache.org/jira/browse/DERBY-5598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Knut Anders Hatlen updated DERBY-5598:
--------------------------------------
Attachment: d5598.diff
This problem looks similar to DERBY-4201, and it reproduces consistently in my
environment with the repro.diff patch attached to that issue.
The problem is that NetworkServerControl.shutdown() returns once the server
socket stops responding, whereas NetworkServerControlImpl.blockingStart()
doesn't print the message about successful shutdown until after the server
socket has been closed. So it is possible that the test checks the contents of
the log after the server socket has been closed, but before the message has
actually been written to the log.
The attached patch attempts to solve this race condition by making the test
wait and re-read the log if the message doesn't show up immediately. This makes
the test pass in my environment, also in combination with the repro patch from
DERBY-4201.
> testStartWithPrintWriter(org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetNewServerTest)junit.framework.AssertionFailedError:
> Num of log item should add
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-5598
> URL: https://issues.apache.org/jira/browse/DERBY-5598
> Project: Derby
> Issue Type: Bug
> Components: Network Server, Test
> Affects Versions: 10.8.2.3
> Reporter: Kathey Marsden
> Attachments: d5598.diff
>
>
> I saw this failure on 10.8 IBM 1.6 on Windows for Feb 1, 2012, build 1239450
> testStartWithPrintWriter(org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetNewServerTest)junit.framework.AssertionFailedError:
> Num of log item should add
> at
> org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetNewServerTest.testStartWithPrintWriter(DerbyNetNewServerTest.java:95)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
> http://people.apache.org/~myrnavl/derby_test_results/v10_8/windows/testlog/ibm16/1239450-suites.All_diff.txt
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira