You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by am...@apache.org on 2016/08/25 10:04:40 UTC

asterixdb git commit: Enable ExecutionTestUtil to Handle Different IntegrationUtil Implementations

Repository: asterixdb
Updated Branches:
  refs/heads/master e56526423 -> 10e3380f2


Enable ExecutionTestUtil to Handle Different IntegrationUtil Implementations

Change-Id: I34ed919b39789c2254d63961c1628dd7b60f5ff2
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1105
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mb...@apache.org>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/10e3380f
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/10e3380f
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/10e3380f

Branch: refs/heads/master
Commit: 10e3380f2c63c5a2a0fc1f4c03ed36516818268b
Parents: e565264
Author: Abdullah Alamoudi <ba...@gmail.com>
Authored: Thu Aug 25 10:01:17 2016 +0300
Committer: abdullah alamoudi <ba...@gmail.com>
Committed: Thu Aug 25 03:03:40 2016 -0700

----------------------------------------------------------------------
 .../common/AsterixHyracksIntegrationUtil.java   |  1 +
 .../asterix/test/runtime/ExecutionTestUtil.java | 20 +++++++++++++++-----
 2 files changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10e3380f/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
----------------------------------------------------------------------
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 03ed3c4..e17eb2f 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
@@ -83,6 +83,7 @@ public class AsterixHyracksIntegrationUtil {
                 }
             };
             ncStartThread.start();
+            ncStartThread.join();
         }
         hcc = new HyracksConnection(cc.getConfig().clientNetIpAddress, cc.getConfig().clientNetPort);
         ncs = nodeControllers.toArray(new NodeControllerService[nodeControllers.size()]);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/10e3380f/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ExecutionTestUtil.java
----------------------------------------------------------------------
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 @@ public class ExecutionTestUtil {
 
     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 @@ public class ExecutionTestUtil {
             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 class ExecutionTestUtil {
     }
 
     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 @@ public class ExecutionTestUtil {
         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");