Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.SystemPropertyTestSetup


        setup =  TestConfiguration.additionalDatabaseDecorator( setup, COMPARISON_DATABASE );

        Properties preReleaseUpgrade = new Properties();
        preReleaseUpgrade.setProperty( "derby.database.allowPreReleaseUpgrade", "true");
       
        setup = new SystemPropertyTestSetup(setup, preReleaseUpgrade );

        // If the first release in the trajectory pre-dates the release which
        // introduced JDBC4, force the client to be the JDBC3 client. This
        // prevents us from falling through and picking up the JDBC4 data source from
        // the system classpath rather than picking up a datasource from
View Full Code Here


    private static Test getSuite() {
        TestSuite suite = new TestSuite("localized Display");
        Properties uiProps = new Properties();
        uiProps.put("derby.ui.locale","es_AR");
        uiProps.put("derby.ui.codeset", ENCODING);
        suite.addTest(new TimeZoneTestSetup(new SystemPropertyTestSetup(
                new LocalizedDisplayScriptTest("LocalizedDisplay"), uiProps),
                "America/Los_Angeles"));
        return getIJConfig(suite);
    }
View Full Code Here

       
        Properties preReleaseUpgrade = new Properties();
        preReleaseUpgrade.setProperty(
                "derby.database.allowPreReleaseUpgrade", "true");
       
        setup = new SystemPropertyTestSetup(setup, preReleaseUpgrade);
  
        return SecurityManagerSetup.noSecurityManager(setup);
    }
View Full Code Here

    private static TestSuite decorateSystemPropertyTests(TestSuite suite) {
        Properties traceProps = new Properties();
        traceProps.put("derby.drda.traceDirectory","/");
        traceProps.put("derby.drda.traceAll","true");
        suite.addTest(new SystemPropertyTestSetup(TestConfiguration.clientServerDecorator(
                new NetworkServerControlApiTest("xtestTraceSystemPropertiesNoPermission")),
                    traceProps));
       
        Properties traceProps2 = new Properties();
       
        traceProps2.put("derby.drda.traceDirectory",getSystemProperty("derby.system.home") + "/trace");
        traceProps2.put("derby.drda.traceAll","true");
        suite.addTest(new SystemPropertyTestSetup(TestConfiguration.clientServerDecorator(
                new NetworkServerControlApiTest("xtestTraceSystemPropertiesHasPermission")),
                    traceProps2));
       
        return suite;
    }
View Full Code Here

        props.setProperty("derby.authentication.provider", "BUILTIN");
        props.setProperty("derby.user." + user, password);

        Test test = new NetworkServerControlApiTest(testName);
        test = TestConfiguration.clientServerDecorator(test);
        test = new SystemPropertyTestSetup(test, props, true);
        test = TestConfiguration.changeUserDecorator(test, user, password);
        return test;
    }
View Full Code Here

        // always set the encoding so that we can reliably read the output
        prop.setProperty("derby.ui.codeset", ENCODING);

        String info = "defaultLocale=" + loc + ",uiLocale=" + ui;
        Test test = new SysinfoLocaleTest(loc, german, info);
        return new SystemPropertyTestSetup(test, prop);
    }
View Full Code Here

  public static Test suite() {
    Properties props = new Properties();

    props.setProperty("derby.language.maxMemoryPerTable", "1");
    return new DatabasePropertyTestSetup(
        new SystemPropertyTestSetup(new CleanDatabaseTestSetup(
        new TestSuite(UpdateCursorTest.class, "UpdateCursorTest")) {

      /**
       * @see org.apache.derbyTesting.junit.CleanDatabaseTestSetup#decorateSQL(java.sql.Statement)
       */
 
View Full Code Here

            systemProperties = systemProperties( credentialsDBPhysicalName );
        } catch (Exception e) { printStackTrace( e ); }

        println( nameOfTest() );
        println( "    NativeAuthenticationServiceTest.decorate() systemProperties = " + systemProperties );
        result = new SystemPropertyTestSetup( result, systemProperties, true );
       
        // DERBY-5580: We should also shut down the engine before deleting
        // the database if we don't set any system properties.
        //result = new TestSetup(result) {
        //        protected void tearDown() {
View Full Code Here

      Properties props = new Properties();       
        props.setProperty("ij.connection.wrongSubprotocol", "jdbc:noone:fruitfly;create=true");
       
        Test test = TestConfiguration.embeddedSuite(ConnectWrongSubprotocolTest.class);
       
      return new SystemPropertyTestSetup(test, props);
    }
View Full Code Here

        Properties p = new Properties();
        p.put("derby.storage.useDefaultFilePermissions", "false");
        p.put("derby.stream.error.file", derbyDotLog);

        totalSuite.addTest(
            new SystemPropertyTestSetup(
                TestConfiguration.singleUseDatabaseDecorator(
                    new SupportFilesSetup(
                        new TestSuite(
                            RestrictiveFilePermissionsTest.class,
                            "haveWeGotAllCreatedFilesSuite"),
                        new String[] {"functionTests/tests/lang/dcl_id.jar"}),
                    dbName),
                p,
                true));

        // Next, test deployment modes, since default settings depend on them

        // For server started from command line, we should still get secure
        // permissions.
        if (Derby.hasServer()) {
            totalSuite.addTest(
                new NetworkServerTestSetup(
                    new RestrictiveFilePermissionsTest(
                        "doTestCliServerIsRestrictive"),
                    new String[]{}, // system properties
                    new String[]{}, // non-default start up arguments
                    true));
        }

        // For server started from API, we should see lax permissions.
        //
        if (supportsLaxTesting) {
            totalSuite.addTest(
                TestConfiguration.clientServerDecorator(
                    new RestrictiveFilePermissionsTest(
                        "doTestNonCliServerIsLax")));

            // For embedded, we should see lax permissions also.
            //
            p = new Properties();
            p.put("derby.stream.error.file", derbyDotLog + ".lax");

            totalSuite.addTest(
                new SystemPropertyTestSetup(
                    new RestrictiveFilePermissionsTest("dotestEmbeddedIsLax"),
                    p,
                    true));
        }
View Full Code Here

TOP

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

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.