private static String[] getClassnameFilters(Class<?> suiteClass) { ClassnameFilters filtersAnnotation = suiteClass.getAnnotation(ClassnameFilters.class); if (filtersAnnotation == null) { return DEFAULT_CLASSNAME_FILTERS; } return filtersAnnotation.value(); }
/** * Helper for running specific tests from the "orm" or "engine" module in the context * of the Elasticsearch module. * * <p>The main difference with running tests directly is that those tests will use * configuration files from the Elasticsearch module (see * <code>src/test/resources/hibernate.properties</code> and * <code>src/test/resources/searchfactoryholder-defaults.properties</code>). * *<p>Adapt the classname filter as needed to run a single test or an entire test package. * * <p>Running such tests from the IDE will require having an Elasticsearch * node running. You can easily start one by running 'mvn elasticsearch:runforked' * from the elasticsearch module in this project. * * @author Gunnar Morling */ @RunWith(ClasspathSuite.class) @ClasspathSuite.ClassnameFilters({ ".*ProjectionQueryTest" }) // @ClasspathSuite.ClassnameFilters({ "org.hibernate.search.test.*" }) public class ImportedTestRunner { }
@RunWith(ClasspathSuite.class) /* * By default, ClasspathSuite would execute all tests it finds. * Note that we need to match the full class name, including the package - thus the * .* at the beginning of the regex. */ @ClassnameFilters({ ".*ClasspathSuiteTest_Test" }) public class ClasspathSuiteTest { public static class ClasspathSuiteTest_Test { @Test public void test() { } } }
@RunWith(ClasspathSuite.class) @ClassnameFilters({ "com.cinchapi.concourse.perf.*" }) public class PerformanceTestSuite { }
@RunWith(ClasspathSuite.class) @ClassnameFilters({ ".*_cpSuite.*" }) public static class MyTestClasspathSuite { }
/** * Run all the bug repros * * @author Jeff Nelson */ @RunWith(ClasspathSuite.class) @ClassnameFilters({ "com.cinchapi.concourse.bugrepro.*" }) public class BugReproSuite { }
/** * Unit tests for the import package * * @author Jeff Nelson */ @RunWith(ClasspathSuite.class) @ClassnameFilters({ "com.cinchapi.concourse.importer.*" }) public class ImportTestSuite { }
/** * A collection of integrations tests that deal with the client and server. * * @author Jeff Nelson */ @RunWith(ClasspathSuite.class) @ClassnameFilters({ "com.cinchapi.concourse.[A-Za-z]+$" }) public class IntegrationTestSuite { }
/** * Unit tests for the HTTP package * * @author Jeff Nelson */ @RunWith(ClasspathSuite.class) @ClassnameFilters({ "com.cinchapi.concourse.http.*" }) public class HttpTestSuite { }
private static String[] getClassnameFilters(Class<?> suiteClass) { ClassnameFilters filtersAnnotation = suiteClass.getAnnotation(ClassnameFilters.class); if (filtersAnnotation == null) { return DEFAULT_CLASSNAME_FILTERS; } return filtersAnnotation.value(); }
private static String[] getClassnameFilters(Class<?> suiteClass) { ClassnameFilters filtersAnnotation = suiteClass.getAnnotation(ClassnameFilters.class); if (filtersAnnotation == null) { return DEFAULT_CLASSNAME_FILTERS; } return filtersAnnotation.value(); }
@RunWith(ClasspathSuite.class) @ClassnameFilters({"org.kaaproject.kaa.server.common.dao.service.Cassandra.*Test", "org.kaaproject.kaa.server.common.nosql.cassandra.dao.*Test"}) public class CassandraTestSuite { @ClassRule public static CustomCassandraCQLUnit cassandraUnit = new CustomCassandraCQLUnit(new ClassPathCQLDataSet("cassandra.cql", false, false), "cassandra-test.yaml", 4 * 60000L); }