[
https://issues.apache.org/jira/browse/DERBY-6178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13630618#comment-13630618
]
Mike Matrigali commented on DERBY-6178:
---------------------------------------
In trying to repro the various AutoloadTest errors I tried some experiments on
my machine. In 400 or so attempts using
various jvms and versions I was never able to reproduce the error. For these
experiments I made a copy of jdbcapi/_Suite.java
and then edited out all tests except for the AutoloadTest and called it
_jdbcapisuite.java.
I then ran 2 of these concurrently and it failed a number of times with errors
similar to what we are seeing in nightly runs.
Basically what you would expect from one test running in a network server and
then having something external take it
down from underneath it.
Finally I tried running the following in 2 separate concurrent threads:
time java -Dderby.tests.trace=true -Dderby.tests.basePort=3500 junit.textui.
TestRunner org.apache.derbyTesting.functionTests.tests.jdbcapi._jdbcapisuite > t
est.out 2>&1
time java -Dderby.tests.trace=true -Dderby.tests.basePort=3000 junit.textui.
TestRunner org.apache.derbyTesting.functionTests.tests.jdbcapi._jdbcapisuite > t
est.out 2>&1
I tried this 200 times for each, and got 38 failures in one and 25 in the
other. In
looking at one of the failures I see in the derby.log that default network
server port is
being used:
Fri Apr 12 11:35:39 PDT 2013 : Apache Derby Network Server - 10.11.0.0 alpha - (
1467322) started and ready to accept connections on port 1527^M
> AutoloadTest does not proprogate orignal jvm -D flags to spawned JVM, leading
> to LAB regression test failures
> -------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-6178
> URL: https://issues.apache.org/jira/browse/DERBY-6178
> Project: Derby
> Issue Type: Bug
> Components: Test
> Affects Versions: 10.11.0.0
> Reporter: Mike Matrigali
> Priority: Critical
>
> IBM lab nightly regression testing is seeing numerious intermittent errors
> while running the
> AutoloadTest. This regression testing often runs multiple runs of
> Suites.all on the same machine at
> the same time and uses the -Dderby.tests.basePort=3500 option to the tests to
> insure network
> server is created on different ports and don't intefere.
> I think the following code in this test that spawn a process is not going
> pass that port info onto the network
> server startup and then lead to problems:
> /**
> * Run {@code AutoloadTest} in a separate JVM.
> */
> public void spawnProcess() throws Exception {
> String[] cmd = {
> "junit.textui.TestRunner", spawnedTestClass.getName()
> };
> SpawnedProcess proc =
> new SpawnedProcess(execJavaCmd(cmd), spawnedTestClass.getName());
> if (proc.complete() != 0) {
> fail(proc.getFailMessage("Test process failed"));
> }
> }
--
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