[
https://issues.apache.org/jira/browse/DERBY-4201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Knut Anders Hatlen updated DERBY-4201:
--------------------------------------
Attachment: d4201-1a.diff
Attaching a patch (d4201-1a.diff) which attempts to address these intermittent
failures by making NetworkServerTestSetup wait until the previous test has
completely shut down its server instance, before it tries to start a new server.
This is done by attempting to start a ServerSocket listening on the server port
and immediately closing it. If it succeeds, the decorator assumes it is safe to
start a new server. If it fails, the decorator waits a little while (0.1 sec)
before it tries again. If it doesn't succeed until the server startup timeout
(default 40 sec, configurable with derby.tests.networkServerStartTimeout) has
elapsed, it gives up and report an exception.
SecureServerTest passes with this patch (when using the repro.diff patch to
provoke the problem), and so does AutoloadTest (DERBY-5194).
> SecureServerTest AssertionFailedError: Timed out waiting for network server
> to start
> ------------------------------------------------------------------------------------
>
> Key: DERBY-4201
> URL: https://issues.apache.org/jira/browse/DERBY-4201
> Project: Derby
> Issue Type: Bug
> Components: Test
> Affects Versions: 10.5.2.0, 10.7.1.1, 10.8.2.2
> Environment: java version "1.4.2"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
> Classic VM (build 1.4.2, J2RE 1.4.2 IBM build cxia32142-20061124 (SR7) (JIT
> enabled: jitc))
> SUSE linux running on vmware.
> Reporter: Kathey Marsden
> Priority: Minor
> Labels: derby_triage10_8
> Attachments: d4201-1a.diff, repro.diff
>
>
> I saw this failure in the nightly run on 4/27 on the 10.5 branch - 10.5.1.2
> - (769232). I have not seen it in previous runs on the same machine. There
> were actually two failures in the test. I think the second one failed because
> of the first so am not reporting a separate issue for that.
> There were 2 failures:
> 1) SecureServerTest( Opened = false, Authenticated= false,
> CustomDerbyProperties= null, WildCardHost= null
> )junit.framework.AssertionFailedError: Timed out waiting for network server
> to start:Spawned SpawnedNetworkServer exitCode=0
> at
> org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:200)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
> at
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
> 2) SecureServerTest( Opened = false, Authenticated= false,
> CustomDerbyProperties=
> functionTests/tests/derbynet/SecureServerTest.derby.properties, WildCardHost=
> null )junit.framework.AssertionFailedError: directory trace does not exist
> at
> org.apache.derbyTesting.functionTests.tests.derbynet.SecureServerTest.setTraceDirectory(SecureServerTest.java:386)
> at
> org.apache.derbyTesting.functionTests.tests.derbynet.SecureServerTest.testServerStartup(SecureServerTest.java:358)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
> Code))
> at
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:105)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
> at
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
--
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