db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julius Stroffek <Julius.Strof...@Sun.COM>
Subject Re: junit - singleUseDatabase & networkserver & teardown
Date Thu, 01 Mar 2007 15:35:04 GMT
Hi Myrna,

thanks for pointing this out. This is probably an issue in test setup. 
Could you please file a JIRA with the exact way how to reproduce this 
situation?

Julo

Myrna van Lunteren wrote:
> Hi,
>
> I had been working on converting users* and dataSourcePermissions*
> tests to junit (in preparation of converting testSecMec), and I had a
> test working.
> I used this:
>  suite() :
>    ....
>            suite.addTest(TestConfiguration.clientServerDecorator(
>                baseSuite("AuthenticationTest:client")));
>   ...
>  basesuite():
>   ...
>       Test test = new 
> AuthenticationTest("testConnectShutdownAuthentication");
>        test = DatabasePropertyTestSetup.builtinAuthentication(test,
>            USERS, PASSWORD_SUFFIX);
>        suite.addTest(new DatabasePropertyTestSetup (test, props, true));
>        ...more tests...
>       return TestConfiguration.singleUseDatabaseDecorator(suite);
>
> Then I synced up to get the current DBO-shutdown-only functionality.
>
> Now, when attempting to run my test with NetworkServer, I see this:
>
> junit.framework.AssertionFailedError:
> org.apache.derby.jdbc.ClientDataSource.setShutdownDatabase(java.lang.String) 
>
>     at junit.framework.Assert.fail(Assert.java:47)
>     at 
> org.apache.derbyTesting.junit.JDBCDataSource.setBeanProperty(JDBCDataSource.java:172)

>
>     at 
> org.apache.derbyTesting.junit.JDBCDataSource.shutdownDatabase(JDBCDataSource.java:187)

>
>     at 
> org.apache.derbyTesting.junit.DropDatabaseSetup.tearDown(DropDatabaseSetup.java:58) 
>
>     at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
>     at junit.framework.TestResult.runProtected(TestResult.java:124)
>     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.framework.TestResult.runProtected(TestResult.java:124)
>     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.framework.TestResult.runProtected(TestResult.java:124)
>     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.framework.TestResult.runProtected(TestResult.java:124)
>     at junit.extensions.TestSetup.run(TestSetup.java:23)
>     at junit.framework.TestSuite.runTest(TestSuite.java:208)
>     at junit.framework.TestSuite.run(TestSuite.java:203)
>     at 
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)

>
>     at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) 
>
>     at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)

>
>     at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)

>
>     at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)

>
>     at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

>
>
> The ClientDataSource does not have a setShutdownDatabase method.
>
> Any suggestions on how to get this working?
>
> Thx,
> Myrna

Mime
View raw message