Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.BaseTestSuite


        initEnvironment();
       
        // String masterHostName = System.getProperty("test.serverHost", "localhost");
        // int masterPortNo = Integer.parseInt(System.getProperty("test.serverPort", "1527"));
       
        BaseTestSuite suite =
            new BaseTestSuite("TestPostStartedMasterAndSlave_Failover");
               
        suite.addTest(TestPostStartedMasterAndSlave_Failover.suite(slaveServerHost, slaveServerPort)); // master?
        System.out.println("*** Done suite.addTest(TestPostStartedMasterAndSlave_Failover.suite())");
       
        return (Test)suite;
    }
View Full Code Here


    /**
     * Implements suite() to run in embedded and client configurations.
     */
    public static Test suite() {
        BaseTestSuite suite = new BaseTestSuite("AutoGenJDBC30Test");

        suite.addTest(baseSuite("AutoGenJDBC30Test:embedded"));

        suite.addTest(TestConfiguration.clientServerDecorator(
            baseSuite("AutoGenJDBC30Test:client")));
        return suite;
    }
View Full Code Here

  /**
   * Return the suite that runs the NIST SQL scripts.
   */
  public static Test suite() {
        BaseTestSuite suite = new BaseTestSuite("NIST");
       
        String suiteUser = null;
        BaseTestSuite userSuite = null;
        for (int i = 0; i < TESTS.length; i++) {
           
            String testScript = TESTS[i][0];
            String testUser = TESTS[i][1];
           
            Test test = new NistScripts(testScript);
           
            if (testUser.equals(suiteUser))
            {
                userSuite.addTest(test);
                continue;
            }
           
            // Add the new user suite with the change user decorator to
            // the main suite but continue to add tests to the user suite.
            userSuite = new BaseTestSuite("NIST user="+testUser);
            String password = testUser.concat("ni8s4T");
            suite.addTest(
                    TestConfiguration.changeUserDecorator(userSuite, testUser, password));
            suiteUser = testUser;
           
            userSuite.addTest(test);
        }
       
        Test test = getIJConfig(suite);
       
        // Setup user authentication
View Full Code Here

     *
     * @param name name of the test
     */
    private static Test baseSuite(String name) {

        BaseTestSuite suite = new BaseTestSuite(name);

        if (!JDBC.vmSupportsJDBC3()) {
            // empty suite
            return suite;
        }

        suite.addTestSuite(AutoGenJDBC30Test.class);

        // Create database objects only once for entire test run
        return new CleanDatabaseTestSetup(suite)
        {
            /**
 
View Full Code Here

     * Creates a suite.
     *
     * @return The test suite
     */
    public static Test suite() {
        BaseTestSuite suite = new BaseTestSuite("BootLockTest");
        suite.addTest(decorateTest());
        return suite;
    }
View Full Code Here

     *
     * @return the decorated test
     */
    private static Test decorateTest() {

        Test test = new BaseTestSuite(BootLockTest.class);

        if (JDBC.vmSupportsJSR169() && !isJ9Platform()) {
            // PhoneME requires forceDatabaseLock
            Properties props = new Properties();
            props.setProperty("derby.database.forceDatabaseLock", "true");
View Full Code Here

    }

    public static Test suite() {
      if ( JDBC.vmSupportsJSR169())
        // see DERBY-2157 for details
                        return new BaseTestSuite(
                "empty SqlExceptionTest - client not supported on JSR169");
      else
        {
            Test test = TestConfiguration.defaultSuite(SqlExceptionTest.class);
            return test;
View Full Code Here

     */
    public static Test suite()
    {
        //NetworkServerTestSetup.setWaitTime( 10000L );
       
        BaseTestSuite      suite = new BaseTestSuite("SecureServerTest");

        // Server booting requires that we run from the jar files
        if ( !TestConfiguration.loadingFromJars() ) { return suite; }
       
        // Need derbynet.jar in the classpath!
        if (!Derby.hasServer())
            return suite;

        // O = Overriden
        // A = Authenticated
        // C = Custom properties
        // W = Wildcard host
        //
        //      .addTest( decorateTest( O,        A,       C,    W,    Outcome ) );
        //

        suite.addTest( decorateTest( false,  false, null, null, RUNNING_SECURITY_BOOTED ) );
        suite.addTest( decorateTest( false,  false, BASIC, null, RUNNING_SECURITY_BOOTED ) );
        suite.addTest( decorateTest( false,  true, null, null, RUNNING_SECURITY_BOOTED ) );
        suite.addTest( decorateTest( false,  true, null, HOSTW, RUNNING_SECURITY_BOOTED ) );
        suite.addTest( decorateTest( false,  true, null, ALTW, RUNNING_SECURITY_BOOTED ) );

        // this wildcard port is rejected by the server right now
        //suite.addTest( decorateTest( false,  true, null, IPV6W, RUNNING_SECURITY_BOOTED ) );
       
        suite.addTest( decorateTest( true,  false, null, null, RUNNING_SECURITY_NOT_BOOTED ) );
        suite.addTest( decorateTest( true,  true, null, null, RUNNING_SECURITY_NOT_BOOTED ) );
       
        return suite;
    }
View Full Code Here

     * @param phase an integer that indicates the current phase in
     *              the upgrade test.
     * @return the test suite created.
     */
    public static Test suite(int phase) {
        BaseTestSuite suite = new BaseTestSuite("Upgrade test for 10.9");

        suite.addTestSuite(Changes10_9.class);
       
        return new SupportFilesSetup(
                (Test)suite, SUPPORT_FILES_SOURCE);
    }
View Full Code Here

    }
   

    public static Test suite() {

        BaseTestSuite suite =
            new BaseTestSuite("NetworkServerControlClientCommandTest");

        // need network server so we can compare command output
        // and we don't run on J2ME because java command is different.
        if (!Derby.hasServer() ||
                JDBC.vmSupportsJSR169())
            return suite;
       
        Test test = TestConfiguration
                .clientServerSuite(NetworkServerControlClientCommandTest.class);
       
        // no security manager because we exec a process and don't have permission for that.
        test = SecurityManagerSetup.noSecurityManager(test);
        suite.addTest(test);
       
        return suite;
    }
View Full Code Here

TOP

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

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.