abdullah alamoudi has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/1105
Change subject: Enable ExecutionTestUtil to Handle Different IntegrationUtil
Implementations
......................................................................
Enable ExecutionTestUtil to Handle Different IntegrationUtil Implementations
Change-Id: I34ed919b39789c2254d63961c1628dd7b60f5ff2
---
M
asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
M
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ExecutionTestUtil.java
2 files changed, 16 insertions(+), 5 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/05/1105/1
diff --git
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
index b1bf418..63d70e4 100644
---
a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
+++
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
@@ -82,6 +82,7 @@
}
};
ncStartThread.start();
+ ncStartThread.join();
}
hcc = new HyracksConnection(cc.getConfig().clientNetIpAddress,
cc.getConfig().clientNetPort);
ncs = nodeControllers.toArray(new
NodeControllerService[nodeControllers.size()]);
diff --git
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ExecutionTestUtil.java
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ExecutionTestUtil.java
index 3195c39..c73be7a 100644
---
a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ExecutionTestUtil.java
+++
b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ExecutionTestUtil.java
@@ -44,15 +44,16 @@
protected static final String TEST_CONFIG_FILE_NAME =
"asterix-build-configuration.xml";
- protected static TestGroup FailedGroup;
+ public static TestGroup FailedGroup;
public static AsterixHyracksIntegrationUtil integrationUtil = new
AsterixHyracksIntegrationUtil();
public static List<ILibraryManager> setUp(boolean cleanup) throws
Exception {
- return setUp(cleanup, TEST_CONFIG_FILE_NAME);
+ return setUp(cleanup, TEST_CONFIG_FILE_NAME, integrationUtil, true);
}
- public static List<ILibraryManager> setUp(boolean cleanup, String
configFile) throws Exception {
+ public static List<ILibraryManager> setUp(boolean cleanup, String
configFile,
+ AsterixHyracksIntegrationUtil integrationUtil, boolean startHdfs)
throws Exception {
System.out.println("Starting setup");
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.info("Starting setup");
@@ -68,7 +69,9 @@
LOGGER.info("initializing HDFS");
}
- HDFSCluster.getInstance().setup();
+ if (startHdfs) {
+ HDFSCluster.getInstance().setup();
+ }
// Set the node resolver to be the identity resolver that expects node
// names
@@ -92,6 +95,11 @@
}
public static void tearDown(boolean cleanup) throws Exception {
+ tearDown(cleanup, integrationUtil, true);
+ }
+
+ public static void tearDown(boolean cleanup, AsterixHyracksIntegrationUtil
integrationUtil, boolean stopHdfs)
+ throws Exception {
// validateBufferCacheState(); <-- Commented out until bug is fixed -->
integrationUtil.deinit(cleanup);
File outdir = new File(PATH_ACTUAL);
@@ -99,7 +107,9 @@
if (files == null || files.length == 0) {
outdir.delete();
}
- HDFSCluster.getInstance().cleanup();
+ if (stopHdfs) {
+ HDFSCluster.getInstance().cleanup();
+ }
if (FailedGroup != null && FailedGroup.getTestCase().size() > 0) {
File temp = File.createTempFile("failed", ".xml");
--
To view, visit https://asterix-gerrit.ics.uci.edu/1105
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I34ed919b39789c2254d63961c1628dd7b60f5ff2
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <[email protected]>