use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class OLAPTest method makeSuite.
public static Test makeSuite() {
Test clean = new CleanDatabaseTestSetup(new BaseTestSuite(OLAPTest.class)) {
protected void decorateSQL(Statement s) throws SQLException {
getConnection().setAutoCommit(false);
s.executeUpdate("create table t1 (a int, b int)");
s.executeUpdate("create table t2 (x int)");
s.executeUpdate("create table t3 (y int)");
s.executeUpdate("create table t4 (a int, b int)");
s.executeUpdate("create table t5 (a int, b int)");
s.executeUpdate("insert into t1 values (10,100),(20,200)," + " (30,300),(40,400)," + " (50,500)");
s.executeUpdate("insert into t2 values (1),(2),(3),(4),(5)");
s.executeUpdate("insert into t3 values (4),(5),(6),(7),(8)");
s.executeUpdate("insert into t4 values (10,100),(20,200)");
s.executeUpdate("insert into t5 values (1,1),(2,4),(3,4),(4,4),(5,9)");
getConnection().commit();
}
};
return clean;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class OffsetFetchNextTest method suite.
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite("OffsetFetchNextTest");
suite.addTest(baseSuite("OffsetFetchNextTest:embedded"));
suite.addTest(TestConfiguration.clientServerDecorator(baseSuite("OffsetFetchNextTest:client")));
return suite;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class OrderByAndOffsetFetchInSubqueries method makeSuite.
/**
* Construct suite of tests
*
* @return A suite containing the test cases.
*/
private static Test makeSuite() {
return new CleanDatabaseTestSetup(new BaseTestSuite(OrderByAndOffsetFetchInSubqueries.class)) {
@Override
protected void decorateSQL(Statement s) throws SQLException {
getConnection().setAutoCommit(false);
s.execute("create table temp1(s varchar(10))");
// GENERATED ALWAYS AS IDENTITY
s.execute("create table temp2(" + "i integer not null " + " generated always as identity," + "s varchar(10))");
s.execute("create table temp2b(" + "i integer not null " + " generated always as identity," + "s varchar(10))");
// DEFAULT value
s.execute("create table temp3(" + "i integer not null " + " generated always as identity," + "s varchar(10)," + "j integer not null " + " default 66," + "t varchar(10))");
// GENERATED ALWAYS AS (expression)
s.execute("create table temp4(" + "i integer not null " + " generated always as identity," + "s varchar(10)," + "j integer not null " + " generated always as (2*i)," + "t varchar(10))");
s.execute("create table t01(c1 int)");
s.execute("create table t02(c2 int)");
s.execute("create table t_source(c1 int, c2 varchar(10))");
s.execute("create table t(i int not null, " + " constraint c unique (i), " + " j int, k int)");
getConnection().commit();
}
};
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class LuceneBackupTest method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Construct top level suite in this JUnit test
*/
public static Test suite() {
BaseTestSuite suite = (BaseTestSuite) TestConfiguration.embeddedSuite(LuceneBackupTest.class);
Test secureTest = new SecurityManagerSetup(suite, POLICY_FILE);
Test authenticatedTest = DatabasePropertyTestSetup.builtinAuthentication(secureTest, LEGAL_USERS, "LuceneBackupPermissions");
Test authorizedTest = TestConfiguration.sqlAuthorizationDecoratorSingleUse(authenticatedTest, DB_NAME, true);
Test supportFilesTest = new SupportFilesSetup(authorizedTest);
return supportFilesTest;
}
use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.
the class LuceneCoarseAuthorizationTest method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Construct top level suite in this JUnit test
*/
public static Test suite() {
BaseTestSuite suite = (BaseTestSuite) TestConfiguration.embeddedSuite(LuceneCoarseAuthorizationTest.class);
Test unsecureTest = SecurityManagerSetup.noSecurityManager(suite);
Test authenticatedTest = DatabasePropertyTestSetup.builtinAuthentication(unsecureTest, LEGAL_USERS, "LuceneCoarsePermissions");
Test coarseTest = new DatabasePropertyTestSetup(authenticatedTest, makeProperties());
Test singleUseTest = TestConfiguration.singleUseDatabaseDecorator(coarseTest);
return singleUseTest;
}
Aggregations