Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.BaseTestSuite


    /**
     * Construct top level suite in this JUnit test
     */
    public static Test suite() {
        BaseTestSuite suite =
            new BaseTestSuite(SequenceTest.class, "Sequence Test");

        // Need atleast JSR169 to run these tests
        if (!JDBC.vmSupportsJSR169() && !JDBC.vmSupportsJDBC3()) {
            return suite;
        }
View Full Code Here


    public static Test suite()
    {
        if (JDBC.vmSupportsJSR169()) {
             // return empty suite;
            return new BaseTestSuite("GrantRevokeDDLTest");
        }

        //test uses triggers and procedures that use DriverManager.
        BaseTestSuite suite = new BaseTestSuite(
            GrantRevokeDDLTest.class, "GrantRevokeDDL Test");

      Test test = new SupportFilesSetup(suite);
      test = new CleanDatabaseTestSetup(test);
      test = DatabasePropertyTestSetup.builtinAuthentication(
View Full Code Here

        super(name);
    }
   
    public static Test suite()
    {
        BaseTestSuite suite = new BaseTestSuite("GROUP BY expression tests");
        suite.addTestSuite(GroupByExpressionTest.class);
       
        TestSetup wrapper = new CleanDatabaseTestSetup(suite) {
          protected void decorateSQL(Statement s) throws SQLException
            {
                for (int i = 0; i < TABLES.length; i++) {
View Full Code Here

    /**
     * Construct top level suite in this JUnit test
     */
    public static Test suite()
    {
        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,
View Full Code Here

   * @return An instance of <code>Test</code> with the implemented tests to
   *         run.
   */
  public static Test suite() {
        // suite of tests with light load on the tables
        BaseTestSuite light = new BaseTestSuite();

        // suite of tests with heavy load on the tables
        BaseTestSuite heavy = new BaseTestSuite();
   
    light.addTest(new SpillHashTest("testJoinLight"));
    light.addTest(new SpillHashTest("testDistinctLight"));
    light.addTest(new SpillHashTest("testCursorLight"));
    heavy.addTest(new SpillHashTest("testJoinHeavy"));
    heavy.addTest(new SpillHashTest("testDistinctHeavy"));
    heavy.addTest(new SpillHashTest("testCursorHeavy"));   
   
    Test lightSetup = new BaseJDBCTestSetup(light) {
      protected void setUp() throws Exception {
        super.setUp();
        Statement stmt = getConnection().createStatement();
              PreparedStatement insA = stmt.getConnection().prepareStatement("insert into ta(ca1,ca2) values(?,?)");
              PreparedStatement insB = stmt.getConnection().prepareStatement("insert into tb(cb1,cb2) values(?,?)");
                           
              insertDups(insA, insB, initDupVals);
              getConnection().commit();
              stmt.close();
             
              //System.out.println("2");
      }
    };
   
    Test heavySetup = new BaseJDBCTestSetup(heavy) {
      protected void setUp() throws Exception {
        super.setUp();
        Statement stmt = getConnection().createStatement();
              PreparedStatement insA = stmt.getConnection().prepareStatement("insert into ta(ca1,ca2) values(?,?)");
              PreparedStatement insB = stmt.getConnection().prepareStatement("insert into tb(cb1,cb2) values(?,?)");       
             
              for (int i = 1; i <= LOTS_OF_ROWS; i++) {
          insA.setInt(1, i);
          insA.setString(2, ca2Val(i));
          insA.executeUpdate();
          insB.setInt(1, i);
          insB.setString(2, cb2Val(i));
          insB.executeUpdate();

          if ((i & 0xff) == 0)
            stmt.getConnection().commit();
        }
        insertDups(insA, insB, spillDupVals);
       
        getConnection().commit();
        stmt.close();
       
        //System.out.println("3");       
      }
    };
   
        BaseTestSuite mainSuite = new BaseTestSuite();
   
    mainSuite.addTest(lightSetup);
    mainSuite.addTest(heavySetup);
   
    return new CleanDatabaseTestSetup(mainSuite) {
      protected void decorateSQL(Statement stmt) throws SQLException {
              for(int i = 0; i < prep.length; i++) {
                stmt.executeUpdate(prep[i]);
View Full Code Here

     * Returns a simple test suite, using the embedded driver only.
     *
     * @return A test suite.
     */
    public static Test suite() {
        BaseTestSuite suite = new BaseTestSuite(UTF8ReaderTest.class);
        return new CleanDatabaseTestSetup(suite) {
            public void decorateSQL(Statement stmt)
                    throws SQLException {
                insertTestData(stmt);
            }
View Full Code Here

    }

    public static Test suite()
            throws Exception {
        Class<? extends TestCase> theClass = BiggerTemporaryClobTest.class;
        BaseTestSuite suite = new BaseTestSuite(
            theClass, "BiggerTemporaryClobTest suite");
        suite.addTest(addModifyingTests(theClass));
        return suite;
    }
View Full Code Here

        this.iClob = null;
        super.tearDown();
    }

    public static Test suite() {
        BaseTestSuite suite = new BaseTestSuite(
            SmallStoreStreamClobTest.class, "SmallStoreStreamClobTest suite");
        return suite;
    }
View Full Code Here

        super(name);
    }

    public static Test suite() throws Exception {

        BaseTestSuite suite = new BaseTestSuite("Package-private tests");

        suite.addTest(org.apache.derby.impl.jdbc._Suite.suite());
        suite.addTest(org.apache.derby.client.am._Suite.suite());

        return suite;
    }
View Full Code Here

    }

    public static Test suite()
            throws Exception {

        BaseTestSuite suite = new BaseTestSuite("client.am package-private");

        suite.addTest(LogicalStatementEntityTest.suite());

        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.