Search in sources :

Example 1 with MultiConfigSuiteBuilder

use of org.voltdb.regressionsuites.MultiConfigSuiteBuilder in project voltdb by VoltDB.

the class TestJDBCConnectionFail method suite.

public static Test suite() throws IOException {
    // the suite made here will all be using the tests from this class
    MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestJDBCConnectionFail.class);
    // build up a project builder for the workload
    VoltProjectBuilder project = getBuilderForTest();
    boolean success;
    m_config = new LocalCluster("decimal-default.jar", 4, 5, kfactor, BackendTarget.NATIVE_EE_JNI);
    m_config.setHasLocalServer(true);
    success = m_config.compile(project);
    assertTrue(success);
    // add this config to the set of tests to run
    builder.addServerConfig(m_config);
    return builder;
}
Also used : LocalCluster(org.voltdb.regressionsuites.LocalCluster) VoltProjectBuilder(org.voltdb.compiler.VoltProjectBuilder) MultiConfigSuiteBuilder(org.voltdb.regressionsuites.MultiConfigSuiteBuilder)

Example 2 with MultiConfigSuiteBuilder

use of org.voltdb.regressionsuites.MultiConfigSuiteBuilder in project voltdb by VoltDB.

the class TestImportSuite method suite.

public static junit.framework.Test suite() throws Exception {
    LocalCluster config;
    Map<String, String> additionalEnv = new HashMap<>();
    //Specify bundle location
    String bundleLocation = System.getProperty("user.dir") + "/bundles";
    System.out.println("Bundle location is: " + bundleLocation);
    additionalEnv.put("voltdbbundlelocation", bundleLocation);
    final MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestImportSuite.class);
    VoltProjectBuilder project = new VoltProjectBuilder();
    project.setUseDDLSchema(true);
    project.addSchema(TestSQLTypesSuite.class.getResource("sqltypessuite-import-ddl.sql"));
    // configure socket importer
    Properties props = buildProperties("port", "7001", "decode", "true", "procedure", "importTable.insert");
    project.addImport(true, "custom", "tsv", "socketstream.jar", props);
    project.addPartitionInfo("importTable", "PKEY");
    // configure log4j socket handler importer
    props = buildProperties("port", "6060", "procedure", "log_events.insert", "log-event-table", "log_events");
    project.addImport(true, "custom", null, "log4jsocketimporter.jar", props);
    /*
         * compile the catalog all tests start with
         */
    config = new LocalCluster("import-ddl-cluster-rep.jar", 4, 1, 0, BackendTarget.NATIVE_EE_JNI, LocalCluster.FailureState.ALL_RUNNING, true, false, additionalEnv);
    config.setHasLocalServer(false);
    boolean compile = config.compile(project);
    assertTrue(compile);
    builder.addServerConfig(config, false);
    return builder;
}
Also used : LocalCluster(org.voltdb.regressionsuites.LocalCluster) TestSQLTypesSuite(org.voltdb.regressionsuites.TestSQLTypesSuite) HashMap(java.util.HashMap) VoltProjectBuilder(org.voltdb.compiler.VoltProjectBuilder) MultiConfigSuiteBuilder(org.voltdb.regressionsuites.MultiConfigSuiteBuilder) Properties(java.util.Properties)

Example 3 with MultiConfigSuiteBuilder

use of org.voltdb.regressionsuites.MultiConfigSuiteBuilder in project voltdb by VoltDB.

the class TestSnapshotConverter method suite.

//
// Build a list of the tests to be run. Use the regression suite
// helpers to allow multiple backends.
// JUnit magic that uses the regression suite helper classes.
//
public static Test suite() throws IOException {
    MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestSnapshotConverter.class);
    VoltProjectBuilder project = new VoltProjectBuilder();
    project.addLiteralSchema("CREATE TABLE T_SP(A2 VARCHAR(128), A1 INTEGER NOT NULL, A3 VARCHAR(64), A4 VARCHAR(64));" + "CREATE TABLE T_MP(A2 VARCHAR(128), A1 INTEGER NOT NULL, A3 VARCHAR(64), A4 VARCHAR(64));");
    project.addPartitionInfo("T_SP", "A1");
    LocalCluster lcconfig = new LocalCluster("testsnapshotstatus.jar", 8, 1, 0, BackendTarget.NATIVE_EE_JNI);
    assertTrue(lcconfig.compile(project));
    builder.addServerConfig(lcconfig);
    return builder;
}
Also used : LocalCluster(org.voltdb.regressionsuites.LocalCluster) VoltProjectBuilder(org.voltdb.compiler.VoltProjectBuilder) MultiConfigSuiteBuilder(org.voltdb.regressionsuites.MultiConfigSuiteBuilder)

Example 4 with MultiConfigSuiteBuilder

use of org.voltdb.regressionsuites.MultiConfigSuiteBuilder in project voltdb by VoltDB.

the class TestCSVFormatterSuite method buildEnv.

public static MultiConfigSuiteBuilder buildEnv() throws Exception {
    final MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestCSVFormatterSuite.class);
    Map<String, String> additionalEnv = new HashMap<>();
    //Specify bundle location
    String bundleLocation = System.getProperty("user.dir") + "/bundles";
    System.out.println("Bundle location is: " + bundleLocation);
    additionalEnv.put("voltdbbundlelocation", bundleLocation);
    VoltProjectBuilder project = new VoltProjectBuilder();
    project.setUseDDLSchema(true);
    project.addSchema(TestSQLTypesSuite.class.getResource("sqltypessuite-import-ddl.sql"));
    project.addPartitionInfo("importCSVTable", "clm_integer");
    // configure socket importer 1
    Properties props = buildProperties("port", "7001", "decode", "true", "procedure", "importCSVTable.insert");
    Properties formatConfig = buildProperties("nullstring", "test", "separator", ",", "blank", "empty", "escape", "\\", "quotechar", "\"", "nowhitespace", "true");
    project.addImport(true, "custom", "csv", "socketstream.jar", props, formatConfig);
    // configure socket importer 2
    props = buildProperties("port", "7002", "decode", "true", "procedure", "importCSVTable.insert");
    formatConfig = buildProperties("nullstring", "test", "separator", ",", "blank", "error", "escape", "\\", "quotechar", "\"", "strictquotes", "true", "trimunquoted", "false");
    project.addImport(true, "custom", "csv", "socketstream.jar", props, formatConfig);
    project.addPartitionInfo("importCSVTable", "clm_integer");
    /*
         * compile the catalog all tests start with
         */
    LocalCluster config = new LocalCluster("import-ddl-cluster-rep.jar", 4, 1, 0, BackendTarget.NATIVE_EE_JNI, LocalCluster.FailureState.ALL_RUNNING, true, false, additionalEnv);
    config.setHasLocalServer(false);
    boolean compile = config.compile(project);
    assertTrue(compile);
    builder.addServerConfig(config);
    return builder;
}
Also used : LocalCluster(org.voltdb.regressionsuites.LocalCluster) TestSQLTypesSuite(org.voltdb.regressionsuites.TestSQLTypesSuite) HashMap(java.util.HashMap) VoltProjectBuilder(org.voltdb.compiler.VoltProjectBuilder) MultiConfigSuiteBuilder(org.voltdb.regressionsuites.MultiConfigSuiteBuilder) Properties(java.util.Properties)

Example 5 with MultiConfigSuiteBuilder

use of org.voltdb.regressionsuites.MultiConfigSuiteBuilder in project voltdb by VoltDB.

the class TestImportStatistics method suite.

public static junit.framework.Test suite() throws Exception {
    LocalCluster config;
    Map<String, String> additionalEnv = new HashMap<>();
    //Specify bundle location
    String bundleLocation = System.getProperty("user.dir") + "/bundles";
    System.out.println("Bundle location is: " + bundleLocation);
    additionalEnv.put("voltdbbundlelocation", bundleLocation);
    final MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestImportStatistics.class);
    VoltProjectBuilder project = new VoltProjectBuilder();
    project.setUseDDLSchema(true);
    project.addSchema(TestSQLTypesSuite.class.getResource("sqltypessuite-import-ddl.sql"));
    project.addProcedures(TestStatsProcedure7.class);
    project.addProcedures(TestStatsProcedure11.class);
    // configure socket importer
    Properties props = buildProperties("port", "7001", "decode", "true", "procedure", "TestImportStatistics$TestStatsProcedure7");
    project.addImport(true, "custom", "csv", "socketstream.jar", props);
    project.addPartitionInfo("importTable", "PKEY");
    // another socket importer
    props = buildProperties("port", "7002", "decode", "true", "procedure", "TestImportStatistics$TestStatsProcedure11");
    project.addImport(true, "custom", "csv", "socketstream.jar", props);
    project.addPartitionInfo("importTable", "PKEY");
    // configure log4j socket handler importer
    props = buildProperties("port", "6060", "procedure", "log_events.insert", "log-event-table", "log_events");
    project.addImport(true, "custom", null, "log4jsocketimporter.jar", props);
    config = new LocalCluster("import-stats-ddl-cluster-rep.jar", 4, 1, 0, BackendTarget.NATIVE_EE_JNI, LocalCluster.FailureState.ALL_RUNNING, true, false, additionalEnv);
    config.setHasLocalServer(false);
    boolean compile = config.compile(project);
    assertTrue(compile);
    builder.addServerConfig(config, false);
    return builder;
}
Also used : LocalCluster(org.voltdb.regressionsuites.LocalCluster) TestSQLTypesSuite(org.voltdb.regressionsuites.TestSQLTypesSuite) HashMap(java.util.HashMap) VoltProjectBuilder(org.voltdb.compiler.VoltProjectBuilder) MultiConfigSuiteBuilder(org.voltdb.regressionsuites.MultiConfigSuiteBuilder) Properties(java.util.Properties)

Aggregations

VoltProjectBuilder (org.voltdb.compiler.VoltProjectBuilder)7 LocalCluster (org.voltdb.regressionsuites.LocalCluster)7 MultiConfigSuiteBuilder (org.voltdb.regressionsuites.MultiConfigSuiteBuilder)7 HashMap (java.util.HashMap)3 Properties (java.util.Properties)3 TestSQLTypesSuite (org.voltdb.regressionsuites.TestSQLTypesSuite)3