[
https://issues.apache.org/jira/browse/DERBY-2813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13741238#comment-13741238
]
Myrna van Lunteren commented on DERBY-2813:
-------------------------------------------
>From browsing through DERBY-700, and looking through past bugs, it looks like
>the problem was that if security Manager is switched on, the test fails.
So, if the last line of in the suite() method in the test:
[...]
Properties p = new Properties();
p.setProperty("derby.infolog.append", "true");
setup = new SystemPropertyTestSetup(setup,p);
return SecurityManagerSetup.noSecurityManager(setup);
Is replaced by:
return setup;
Then the test passes when run with classes, but fails as follows when run with
jars (I tried with sane):
1)
testBootingAnAlreadyBootedDatabase(org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest)junit.framework.AssertionFailedError:
booted database that was already booted by another CLR
at
org.apache.derbyTesting.functionTests.tests.store.ClassLoaderBootTest.testBootingAnAlreadyBootedDatabase(ClassLoaderBootTest.java:179)
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:117)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:439)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:456)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at
org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
This comes from the following section in the test:
// first boot the database using one loader and attempt
// to boot it using another loader, it should fail to boot.
setThreadLoader(loader_1);
DataSource ds_1 = JDBCDataSource.getDataSource();
Connection conn1 = ds_1.getConnection();
// now attemp to boot using another class loader.
setThreadLoader(loader_2);
DataSource ds_2 = JDBCDataSource.getDataSource();
try {
ds_2.getConnection();
:179=> fail("booted database that was already booted by another CLR");
} catch (SQLException e) {
SQLException ne = e.getNextException();
assertPreventDualBoot(ne);
JDBCDataSource.shutEngine(ds_2);
}
> enable security manager for store/ClassLoaderBootTest
> -----------------------------------------------------
>
> Key: DERBY-2813
> URL: https://issues.apache.org/jira/browse/DERBY-2813
> Project: Derby
> Issue Type: Sub-task
> Components: Test
> Affects Versions: 10.3.1.4
> Environment: The test ClassLoaderBoot test currently runs without
> security manager. Security manager needs to be enabled.
> Reporter: Kathey Marsden
> Priority: Minor
>
--
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