use of org.locationtech.geowave.test.annotation.Environments in project geowave by locationtech.
the class GeoWaveITRunner method getTestEnvironments.
private TestEnvironment[] getTestEnvironments() throws NullPointerException {
final Set<Environment> environments = new HashSet<>();
final Environments es = getTestClass().getJavaClass().getAnnotation(Environments.class);
if (es != null) {
final Environment[] envs = es.value();
for (final Environment env : envs) {
environments.add(env);
}
}
final List<FrameworkMethod> envMethods = getTestEnvAnnotatedMethods();
for (final FrameworkMethod m : envMethods) {
final Environment[] envs = m.getMethod().getAnnotation(Environments.class).value();
for (final Environment env : envs) {
environments.add(env);
}
}
final TestEnvironment[] testEnvs = new TestEnvironment[environments.size() + storeTypes.size()];
int i = 0;
for (final GeoWaveStoreType t : storeTypes) {
testEnvs[i++] = t.getTestEnvironment();
}
for (final Environment e : environments) {
testEnvs[i++] = e.getTestEnvironment();
}
return processDependencies(testEnvs);
}
Aggregations