use of org.apache.asterix.testframework.xml.TestGroup in project asterixdb by apache.
the class ExecutionTestUtil method setUp.
public static List<ILibraryManager> setUp(boolean cleanup, String configFile, AsterixHyracksIntegrationUtil alternateIntegrationUtil, boolean startHdfs) throws Exception {
System.out.println("Starting setup");
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.info("Starting setup");
}
System.setProperty(GlobalConfig.CONFIG_FILE_PROPERTY, configFile);
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.info("initializing pseudo cluster");
}
integrationUtil = alternateIntegrationUtil;
integrationUtil.init(cleanup);
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.info("initializing HDFS");
}
if (startHdfs) {
HDFSCluster.getInstance().setup();
}
// Set the node resolver to be the identity resolver that expects node
// names
// to be node controller ids; a valid assumption in test environment.
System.setProperty(ExternalDataConstants.NODE_RESOLVER_FACTORY_PROPERTY, IdentitiyResolverFactory.class.getName());
FailedGroup = new TestGroup();
FailedGroup.setName("failed");
List<ILibraryManager> libraryManagers = new ArrayList<>();
// Adds the library manager for CC.
libraryManagers.add(((ICcApplicationContext) integrationUtil.cc.getApplicationContext()).getLibraryManager());
// Adds library managers for NCs, one-per-NC.
for (NodeControllerService nc : integrationUtil.ncs) {
INcApplicationContext runtimeCtx = (INcApplicationContext) nc.getApplicationContext();
libraryManagers.add(runtimeCtx.getLibraryManager());
}
return libraryManagers;
}
Aggregations