Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 669E1105A3 for ; Thu, 15 Aug 2013 17:36:34 +0000 (UTC) Received: (qmail 39736 invoked by uid 500); 15 Aug 2013 17:36:04 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 39593 invoked by uid 500); 15 Aug 2013 17:35:55 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 39566 invoked by uid 99); 15 Aug 2013 17:35:54 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2013 17:35:54 +0000 Date: Thu, 15 Aug 2013 17:35:54 +0000 (UTC) From: "Myrna van Lunteren (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-2813) enable security manager for store/ClassLoaderBootTest MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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