Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.SecurityManagerSetup


        String policyName = new SysinfoTest("test").makePolicyName();
        Test test = TestConfiguration.clientServerSuite(SysinfoTest.class);

        // Install a security manager using the initial policy file.
        test = TestConfiguration.singleUseDatabaseDecorator(
                new SecurityManagerSetup(test, policyName));

        // Copy over the policy file we want to use.
        String POLICY_FILE_NAME=
            "functionTests/tests/derbynet/SysinfoTest.policy";
View Full Code Here


    private static Test decorateWithPolicy(Test test) {
        String serverPolicyName = new ServerPropertiesTest("test").makeServerPolicyName();
        //
        // Install a security manager using the initial policy file.
        //
        test = new SecurityManagerSetup(test,serverPolicyName );
        // Copy over the policy file we want to use.
        //
        test = new SupportFilesSetup(
            test, null, new String[] {POLICY_FILE_NAME},
            null, new String[] {TARGET_POLICY_FILE_NAME}
View Full Code Here

            //Only add the tests if this is a sane build.
            Class.forName("org.apache.derby.shared.common.sanity." +
                "AssertFailure");

            // Run with thread dump permissions
            suite.addTest(new SecurityManagerSetup(new AssertFailureTest(
                "testAssertFailureThreadDump"), POLICY_FILENAME));

            // Run WITHOUT thread dump permissions
            suite.addTest(new SecurityManagerSetup(new AssertFailureTest(
                "testAssertFailureNoThreadDump"), NO_DUMP_POLICY_FILENAME));

        } catch (ClassNotFoundException e) {
            //Ignore. Just return an empty suite.
        }
View Full Code Here

    private static Test decorateWithPolicy(Test test) {
        String serverPolicyName = makeServerPolicyName();
        //
        // Install a security manager using the initial policy file.
        //
        test = new SecurityManagerSetup(test,serverPolicyName );
        // Copy over the policy file we want to use.
        //
        test = new SupportFilesSetup(
                test, null, new String[] {POLICY_FILE_NAME},
                null, new String[] {TARGET_POLICY_FILE_NAME}
View Full Code Here

        BaseTestSuite suite = new BaseTestSuite("NewOptimizerOverridesTest");

        suite.addTest( TestConfiguration.embeddedSuite( NewOptimizerOverridesTest.class ) );

        // use a policy file which allows the xml-based plan reader to access fields in the ResultSet graph
        return new SecurityManagerSetup
            (
             suite,
             "org/apache/derbyTesting/functionTests/tests/lang/resultSetReader.policy"
             );
    }
View Full Code Here

            //Only add the tests if this is a sane build.
            Class.forName("org.apache.derby.shared.common.sanity." +
                "AssertFailure");

            // Run with thread dump permissions
            suite.addTest(new SecurityManagerSetup(new AssertFailureTest(
                "testAssertFailureThreadDump"), POLICY_FILENAME));

            // Run WITHOUT thread dump permissions
            suite.addTest(new SecurityManagerSetup(new AssertFailureTest(
                "testAssertFailureNoThreadDump"), NO_DUMP_POLICY_FILENAME));

        } catch (ClassNotFoundException e) {
            //Ignore. Just return an empty suite.
        }
View Full Code Here

         * The output would change whether the test was being ran for the first
         * or subsequent times. */
        test = TestConfiguration.singleUseDatabaseDecorator(test);
        test = new LocaleTestSetup(test, serverLocale);
        // Install a security manager using the initial policy file.
        return new SecurityManagerSetup(test, POLICY_FILE_NAME);
    }
View Full Code Here

        }
        bIn.close();

        // Install a security policy and copy the required include files.
        final String resourcePath = "functionTests/tests/derbynet";
        return new SecurityManagerSetup(
                TestConfiguration.clientServerDecorator(
                    new SupportFilesSetup(suite, new String[] {
                        resourcePath + "/connect.inc",
                        resourcePath + "/excsat_accsecrd1.inc",
                        resourcePath + "/excsat_accsecrd2.inc",
View Full Code Here

   
    public static Test suite() {
      // Run just the one fixture with the custom SecurityManager
        Test t = new Derby5582AutomaticIndexStatisticsTest("testDerby5582");
        Derby5582SecurityManager sm =  new Derby5582SecurityManager();
        return TestConfiguration.additionalDatabaseDecorator(new SecurityManagerSetup(t, null,
                sm),MASTERDB);
        }
View Full Code Here

        diagProperties.setProperty("derby.stream.error.extendedDiagSeverityLevel", "30000");
        diagProperties.setProperty("derby.infolog.append", "true");
        test = new SystemPropertyTestSetup(test, diagProperties, true);
    
        // Install a security manager using the initial policy file.
        return new SecurityManagerSetup(test, POLICY_FILE_NAME);
    }
View Full Code Here

TOP

Related Classes of org.apache.derbyTesting.junit.SecurityManagerSetup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.