Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.BaseJDBCTestSetup


  protected void initializeConnection(Connection conn) throws SQLException {
    conn.setAutoCommit(false);   
  }
 
  public static Test suite() {
        return new BaseJDBCTestSetup(
            new BaseTestSuite(
                TimestampArithTest.class, "TimestampArithTest")) {

      protected void setUp() throws Exception {
        super.setUp();
View Full Code Here


        return rsSuite;
    }

    private static Test decorateTestSuite(Test rsSuite) {
        // Wrap suite in a TestSetup-class.
        return new BaseJDBCTestSetup(rsSuite) {
                protected void setUp()
                        throws SQLException {
                    Connection con = getConnection();
                    Statement stmt = con.createStatement();
                    stmt.execute("create table UpdateTestTableResultSet (" +
View Full Code Here

  protected void initializeConnection(Connection conn) throws SQLException {
    conn.setAutoCommit(false);   
  }
 
  public static Test suite() {
    return new BaseJDBCTestSetup(new TestSuite(TimestampArithTest.class,
        "TimestampArithTest")) {

      protected void setUp() throws Exception {
        super.setUp();
View Full Code Here

        reqDataSuite.addTest(new StatementPoolingTest(
                "resTestCommitOnReuse"));
        reqDataSuite.addTest(new StatementPoolingTest(
                "resTestNoDataCommittedOnInvalidTransactionState"));
        suite.addTest(TestConfiguration.connectionCPDecorator(
                new BaseJDBCTestSetup(reqDataSuite) {
                public void setUp() throws Exception {
                    // Generate some data we can use in the tests.
                    Statement stmt = getConnection().createStatement();
                    try {
                        stmt.executeUpdate("drop table stmtpooltest");
View Full Code Here

        reqDataSuite.addTest(new StatementPoolingTest(
                "resTestCommitOnReuse"));
        reqDataSuite.addTest(new StatementPoolingTest(
                "resTestNoDataCommittedOnInvalidTransactionState"));
        suite.addTest(TestConfiguration.connectionCPDecorator(
                new BaseJDBCTestSetup(reqDataSuite) {
                public void setUp() throws Exception {
                    // Generate some data we can use in the tests.
                    Statement stmt = getConnection().createStatement();
                    try {
                        stmt.executeUpdate("drop table stmtpooltest");
View Full Code Here

     */
    public static Test suite() {
        TestSuite testSuite = new TestSuite("JDBCDriverTest suite");
        testSuite.addTestSuite(JDBCDriverTest.class);
        return TestConfiguration.defaultExistingServerDecorator(
                new BaseJDBCTestSetup(testSuite) {

                    protected void setUp() throws Exception {
                        super.setUp();
                        Connection con = getConnection();
                        Statement s = con.createStatement();
View Full Code Here

    public static Test suite()
    {
        TestSuite suite = new TestSuite();
        suite.addTestSuite(GroupByExpressionTest.class);
       
        TestSetup wrapper = new BaseJDBCTestSetup(suite) {
            public void setUp() throws Exception
            {
                Connection c = getConnection();
                c.setAutoCommit(false);
                Statement s = c.createStatement();
View Full Code Here

                "resTestCommitOnReuse"));
        // This test fails, DERBY-3319 is probably the cause.
        //reqDataSuite.addTest(new StatementPoolingTest(
        //        "resTestNoDataCommittedOnInvalidTransactionState"));
        suite.addTest(TestConfiguration.connectionCPDecorator(
                new BaseJDBCTestSetup(reqDataSuite) {
                public void setUp() throws Exception {
                    // Generate some data we can use in the tests.
                    Statement stmt = getConnection().createStatement();
                    try {
                        stmt.executeUpdate("drop table stmtpooltest");
View Full Code Here

        return rsSuite;
    }

    private static Test decorateTestSuite(Test rsSuite) {
        // Wrap suite in a TestSetup-class.
        return new BaseJDBCTestSetup(rsSuite) {
                protected void setUp()
                        throws SQLException {
                    Connection con = getConnection();
                    Statement stmt = con.createStatement();
                    stmt.execute("create table UpdateTestTableResultSet (" +
View Full Code Here

    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(?,?)");       
View Full Code Here

TOP

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

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.