Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.DatabasePropertyTestSetup


   */
  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


        dbprops.setProperty("derby.debug.true", "AuthenticationTrace");
        dbprops.setProperty("derby.user.APP", "xxxx");
        dbprops.setProperty("derby.user.testuser", "testpass");
        String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
        dbprops.setProperty("derby.database.users." + dbName, "testuser,APP");
        test = new DatabasePropertyTestSetup (test, dbprops, true);
        suite.addTest(test);
    }
View Full Code Here

        Properties sysprops = new Properties();
        sysprops.put("derby.user.system", "admin");
        sysprops.put("derby.user.mickey", "mouse");
        test = DatabasePropertyTestSetup.builtinAuthentication(test,
            USERS, PASSWORD_SUFFIX);
        test = new DatabasePropertyTestSetup (test, props, true);
        suite.addTest(new SystemPropertyTestSetup (test, sysprops));
    }
View Full Code Here

        Properties props = new Properties();
        props.setProperty("derby.locks.waitTimeout", "90");
        props.setProperty("derby.language.stalePlanCheckInterval", "5");
        suite.addTest(
            TestConfiguration.singleUseDatabaseDecorator(
                new DatabasePropertyTestSetup(
                    new DatabaseMetaDataTest("recompileTimeoutTest"),
                    props, true)));

        return suite;
    }
View Full Code Here

        sysprops.put("derby.storage.keepTransactionLog", "true");
        sysprops.put("derby.language.logStatementText", "true");
        sysprops.put("derby.infolog.append", "true");
        Test embedded = new TestSuite(StressMultiTest.class);
        embedded = new SystemPropertyTestSetup(embedded,sysprops,true);
        embedded = new DatabasePropertyTestSetup(embedded,dbprops);
        // make this a singleUseDatabase so the datbase and
        // transaction log will be preserved.
        embedded = TestConfiguration.singleUseDatabaseDecorator(newCleanDatabase(embedded));
        // SystemPropertyTestSetup for static properties
        // does not work for client because shutting down the
        // engine causes protocol errors on the client. Run
        // with -Dderby.storage.keepTransactionLog=true if
        // you need to save the transaction log for client.
        Test client = TestConfiguration.clientServerDecorator(
            new TestSuite(StressMultiTest.class));
        client = newCleanDatabase(new DatabasePropertyTestSetup(client,dbprops));
        Test encrypted = new TestSuite(StressMultiTest.class);
        // SystemPropertyTestSetup for static properties
        // does not work for encrypted databases because the
        // database has to be rebooted and we don't have access
        // to the boot password (local to Decorator.encryptedDatabase()
        // Run with -Dderby.storage.keepTransactionLog=true if you
        // need to save the transaction log for encrypted.
        TestSuite unencrypted = new TestSuite("StressMultiTest:unencrypted");
        unencrypted.addTest((embedded));
        unencrypted.addTest((client));

        TestSuite suite = new TestSuite("StressMultiTest, " + THREADS +
                " Threads " + MINUTES + " Minutes");
        suite.addTest(newCleanDatabase(unencrypted));
        //Encrypted uses a different database so it needs its own newCleanDatabase
        suite.addTest(Decorator.encryptedDatabase(new DatabasePropertyTestSetup(newCleanDatabase(encrypted),dbprops)));

        return suite;
    }
View Full Code Here

        sysprops.put("derby.storage.keepTransactionLog", "true");
        sysprops.put("derby.language.logStatementText", "true");
        sysprops.put("derby.infolog.append", "true");
        Test embedded = new TestSuite(StressMultiTest.class);
        embedded = new SystemPropertyTestSetup(embedded,sysprops,true);
        embedded = new DatabasePropertyTestSetup(embedded,dbprops);
        embedded = TestConfiguration.singleUseDatabaseDecorator(newCleanDatabase(embedded));
        return embedded;
    }
View Full Code Here

        Properties sysprops = new Properties();
        sysprops.put("derby.user.system", "admin");
        sysprops.put("derby.user.mickey", "mouse");
        test = DatabasePropertyTestSetup.builtinAuthentication(test,
            USERS, PASSWORD_SUFFIX);
        test = new DatabasePropertyTestSetup (test, props, true);
        suite.addTest(new SystemPropertyTestSetup (test, sysprops));
    }
View Full Code Here

        //#drda property ,test for it in sysinfo output
        sysprops.put("derby.drda.securityMechanism","USER_ONLY_SECURITY");
        Test test = new SystemPropertyTestSetup(decorateTest(), sysprops);
        Properties prop = new Properties();
        prop.put("derby.locks.waitTimeout","120");
        test = new DatabasePropertyTestSetup(test, prop);
        //suite.addTest(new SystemPropertyTestSetup(decorateTest(), props));
        suite.addTest(test);

        return suite;
    }
View Full Code Here

        Properties properties = new Properties();
        // setting to 60, which is the default, for starters
        properties.setProperty("derby.locks.waitTimeout", "60");

        Test suite = TestConfiguration.embeddedSuite (LockTableVtiTest.class);
        suite = new DatabasePropertyTestSetup(suite, properties, true);
        return new CleanDatabaseTestSetup(suite) {
            /**
             * Creates the schemas and table used in the test cases.
             *
             * @throws SQLException
View Full Code Here

        sysprops.put("derby.storage.keepTransactionLog", "true");
        sysprops.put("derby.language.logStatementText", "true");
        sysprops.put("derby.infolog.append", "true");
        Test embedded = new BaseTestSuite(StressMultiTest.class);
        embedded = new SystemPropertyTestSetup(embedded,sysprops,true);
        embedded = new DatabasePropertyTestSetup(embedded,dbprops);
        // make this a singleUseDatabase so the datbase and
        // transaction log will be preserved.
        embedded = TestConfiguration.singleUseDatabaseDecorator(newCleanDatabase(embedded));
        // SystemPropertyTestSetup for static properties
        // does not work for client because shutting down the
        // engine causes protocol errors on the client. Run
        // with -Dderby.storage.keepTransactionLog=true if
        // you need to save the transaction log for client.
        Test client = TestConfiguration.clientServerDecorator(
                new BaseTestSuite(StressMultiTest.class));
        client = newCleanDatabase(new DatabasePropertyTestSetup(client,dbprops));
        Test encrypted = new BaseTestSuite(StressMultiTest.class);
        // SystemPropertyTestSetup for static properties
        // does not work for encrypted databases because the
        // database has to be rebooted and we don't have access
        // to the boot password (local to Decorator.encryptedDatabase()
        // Run with -Dderby.storage.keepTransactionLog=true if you
        // need to save the transaction log for encrypted.
        BaseTestSuite unencrypted =
            new BaseTestSuite("StressMultiTest:unencrypted");

        unencrypted.addTest((embedded));
        unencrypted.addTest((client));

        BaseTestSuite suite =
            new BaseTestSuite("StressMultiTest, " + THREADS +
                               " Threads " + MINUTES + " Minutes");

        suite.addTest(newCleanDatabase(unencrypted));
        //Encrypted uses a different database so it needs its own newCleanDatabase
        suite.addTest(Decorator.encryptedDatabase(new DatabasePropertyTestSetup(newCleanDatabase(encrypted),dbprops)));

        return suite;
    }
View Full Code Here

TOP

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

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.