falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rostafiyc...@apache.org
Subject falcon git commit: FALCON-1005 In ProcessInstanceSuspendTest clean test dir after each method execution. Contributed by Paul Isaychuk
Date Fri, 23 Jan 2015 11:01:54 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 4a9cba4a5 -> bf134264d


FALCON-1005 In ProcessInstanceSuspendTest clean test dir after each method execution. Contributed
by Paul Isaychuk


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

Branch: refs/heads/master
Commit: bf134264ddf15d5716e35fe272d651e332c3a157
Parents: 4a9cba4
Author: Ruslan Ostafiychuk <rostafiychuk@apache.org>
Authored: Fri Jan 23 13:01:34 2015 +0200
Committer: Ruslan Ostafiychuk <rostafiychuk@apache.org>
Committed: Fri Jan 23 13:01:34 2015 +0200

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                     |  3 +++
 .../regression/ProcessInstanceSuspendTest.java    | 18 +++++-------------
 2 files changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/bf134264/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index bdd8658..2e0e454 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -206,6 +206,9 @@ Trunk (Unreleased)
    FALCON-681 delete duplicate feed retention test from falcon regression (SamarthG)
 
   BUG FIXES
+   FALCON-1005 In ProcessInstanceSuspendTest clean test dir after each method execution
+   (Paul Isaychuk via Ruslan Ostafiychuk)
+
    FALCON-990 Fix and enable 3/4 tests of RescheduleProcessInFinalStatesTest (Ruslan Ostafiychuk)
 
    FALCON-951 Adding wait till instance goes into running for tests in falcon trunk

http://git-wip-us.apache.org/repos/asf/falcon/blob/bf134264/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceSuspendTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceSuspendTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceSuspendTest.java
index 89ff0f3..6058713 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceSuspendTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/ProcessInstanceSuspendTest.java
@@ -33,14 +33,14 @@ import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.testHelper.BaseTestClass;
 import org.apache.falcon.resource.InstancesResult;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.log4j.Logger;
 import org.apache.oozie.client.CoordinatorAction;
 import org.apache.oozie.client.OozieClient;
 import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
+import java.io.IOException;
+
 
 /**
  * Process instance suspend tests.
@@ -54,22 +54,13 @@ public class ProcessInstanceSuspendTest extends BaseTestClass {
     private String aggregateWorkflowDir = baseTestHDFSDir + "/aggregator";
     private ColoHelper cluster = servers.get(0);
     private FileSystem clusterFS = serverFS.get(0);
-    private static final Logger LOGGER = Logger.getLogger(ProcessInstanceSuspendTest.class);
     private String processName;
     private OozieClient clusterOC = serverOC.get(0);
 
-    @BeforeClass(alwaysRun = true)
-    public void createTestData() throws Exception {
-        LOGGER.info("in @BeforeClass");
-        HadoopUtil.uploadDir(clusterFS, aggregateWorkflowDir, OSUtil.RESOURCES_OOZIE);
-        Bundle bundle = BundleUtil.readELBundle();
-        bundle = new Bundle(bundle, cluster);
-        bundle.setInputFeedDataPath(feedInputPath);
-    }
-
     @BeforeMethod(alwaysRun = true)
     public void setup() throws Exception {
         bundles[0] = BundleUtil.readELBundle();
+        HadoopUtil.uploadDir(clusterFS, aggregateWorkflowDir, OSUtil.RESOURCES_OOZIE);
         bundles[0] = new Bundle(bundles[0], cluster);
         bundles[0].generateUniqueBundle();
         bundles[0].setInputFeedDataPath(feedInputPath);
@@ -80,8 +71,9 @@ public class ProcessInstanceSuspendTest extends BaseTestClass {
     }
 
     @AfterMethod(alwaysRun = true)
-    public void tearDown() {
+    public void tearDown() throws IOException {
         removeBundles();
+        HadoopUtil.deleteDirIfExists(baseTestHDFSDir, clusterFS);
     }
 
     /**


Mime
View raw message