db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manjula Kutty" <manjula.ku...@gmail.com>
Subject The trace property is not getting set when the the db is already there
Date Wed, 25 Jun 2008 23:31:06 GMT
Hi,

While converting the test getcurrentproperties.java to junit I came across
(Kristian also pointed this out) that when the the database is already there
then the following code fails

 NetworkServerControl nsctrl =
NetworkServerTestSetup.getNetworkServerControl();
nsctrl.trace(4,true);
nsctrl.ping();
assertTrue(fileExists(traceDir+"/Server4.trace"));
nsctrl.logConnections(true);

When I run it on a new dir the test runs fine. But if I rerun the test again
in the same directory it fails saying

1)
testPropertiesAfterConnection(org.apache.derbyTesting.functionTests.tests.der
bynet.GetCurrentPropertiesTest)junit.framework.AssertionFailedError:
expected:<1
2> but was:<11>
        at
org.apache.derbyTesting.functionTests.tests.derbynet.GetCurrentProper
tiesTest.testPropertiesAfterConnection(GetCurrentPropertiesTest.java:205)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:64)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
104)
        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)



I think this is the same problem with the original test too.(DERBY-2209)

There it was intermittent, but here it is not.. Does anyone any insight on
this issue??

Thanks,
Manjula.

Mime
View raw message