@Override public void tearDown() throws Exception { super.tearDown(); }
/** * Add a sever configuration to the set of configurations we want these tests to run on. * * @param config A Server Configuration to run this set of tests on. */ public boolean addServerConfig(VoltServerConfig config) { final String enabled_configs = System.getenv().get("VOLT_REGRESSIONS"); System.out.println("VOLT REGRESSIONS ENABLED: " + enabled_configs); if (!(enabled_configs == null || enabled_configs.contentEquals("all"))) { if (config instanceof LocalCluster) { if (config.isHSQL() && !enabled_configs.contains("hsql")) { return true; } if ((config.getNodeCount() == 1) && !enabled_configs.contains("local")) { return true; } if ((config.getNodeCount() > 1) && !enabled_configs.contains("cluster")) { return true; } } } final String buildType = System.getenv().get("BUILD"); if (buildType != null) { if (buildType.startsWith("memcheck")) { if (config instanceof LocalCluster) { LocalCluster lc = (LocalCluster) config; // don't run valgrind on multi-node clusters without embedded processes if ((lc.getNodeCount() > 1) || (lc.m_hasLocalServer == false)) { return true; } } if (config.isHSQL()) { return true; } } } // get the constructor of the test class Constructor<?> cons = null; try { cons = m_testClass.getConstructor(String.class); } catch (Exception e) { e.printStackTrace(); return false; } // get the set of test methods List<String> methods = getTestMethodNames(m_testClass); // add a test case instance for each method for the specified // server config for (String mname : methods) { RegressionSuite rs = null; try { rs = (RegressionSuite) cons.newInstance(mname); } catch (Exception e) { e.printStackTrace(); return false; } rs.setConfig(config); super.addTest(rs); } return true; }