abdullah alamoudi has submitted this change and it was merged. Change subject: Enable ExecutionTestUtil to Handle Different IntegrationUtil Implementations ......................................................................
Enable ExecutionTestUtil to Handle Different IntegrationUtil Implementations Change-Id: I34ed919b39789c2254d63961c1628dd7b60f5ff2 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1105 Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Michael Blow <mb...@apache.org> Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> --- 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(-) Approvals: Michael Blow: Looks good to me, approved Jenkins: Verified; No violations found; Verified 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 @@ } }; 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: merged Gerrit-Change-Id: I34ed919b39789c2254d63961c1628dd7b60f5ff2 Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi <bamou...@gmail.com> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Michael Blow <mb...@apache.org> Gerrit-Reviewer: abdullah alamoudi <bamou...@gmail.com>