falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pall...@apache.org
Subject falcon git commit: FALCON-1403 Revisit IT cleanup and teardown (Contributed by Narayan Periwal)
Date Fri, 18 Sep 2015 09:51:44 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 393169367 -> 057440ad9


FALCON-1403 Revisit IT cleanup and teardown (Contributed by Narayan Periwal)


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

Branch: refs/heads/master
Commit: 057440ad9ce8b0c3adb4e67a7c62b33df865a498
Parents: 3931693
Author: Pallavi Rao <pallavi.rao@inmobi.com>
Authored: Fri Sep 18 15:21:22 2015 +0530
Committer: Pallavi Rao <pallavi.rao@inmobi.com>
Committed: Fri Sep 18 15:21:22 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                                  | 1 +
 .../org/apache/falcon/catalog/CatalogPartitionHandlerIT.java | 6 ++++++
 .../java/org/apache/falcon/catalog/HiveCatalogServiceIT.java | 1 +
 webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java  | 6 ++++++
 .../test/java/org/apache/falcon/cli/FalconCLISmokeIT.java    | 6 ++++++
 .../test/java/org/apache/falcon/late/LateDataHandlerIT.java  | 1 +
 .../apache/falcon/lifecycle/FileSystemFeedReplicationIT.java | 5 +----
 .../apache/falcon/lifecycle/TableStorageFeedEvictorIT.java   | 6 ++++++
 .../falcon/lifecycle/TableStorageFeedReplicationIT.java      | 1 +
 .../test/java/org/apache/falcon/process/PigProcessIT.java    | 6 ++++++
 .../org/apache/falcon/process/TableStorageProcessIT.java     | 4 +---
 .../org/apache/falcon/resource/EntityManagerJerseyIT.java    | 6 ++++++
 .../apache/falcon/resource/EntityManagerJerseySmokeIT.java   | 6 ++++++
 .../falcon/resource/EntityManagerPaginationJerseyIT.java     | 6 ++++++
 .../org/apache/falcon/resource/MetadataResourceJerseyIT.java | 6 ++++++
 .../org/apache/falcon/resource/ProcessInstanceManagerIT.java | 6 ++++++
 .../test/java/org/apache/falcon/resource/TestContext.java    | 8 ++++++++
 .../apache/falcon/validation/ClusterEntityValidationIT.java  | 6 ++++++
 .../org/apache/falcon/validation/FeedEntityValidationIT.java | 1 +
 19 files changed, 81 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2325052..7520ba6 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -25,6 +25,7 @@ Trunk (Unreleased)
     FALCON-348 Add shutdown hook for Falcon (Sandeep Samudrala via Pallavi Rao)
  
   OPTIMIZATIONS
+    FALCON-1403 Revisit IT cleanup and teardown(Narayan Periwal via Pallavi Rao)
 
   BUG FIXES
     FALCON-1408 Add more logging information for failing ClusterEntityValidationIT(Pavan
Kumar Kolamuri via Ajay Yadava)

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/catalog/CatalogPartitionHandlerIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/catalog/CatalogPartitionHandlerIT.java
b/webapp/src/test/java/org/apache/falcon/catalog/CatalogPartitionHandlerIT.java
index c7b7d3b..846b83c 100644
--- a/webapp/src/test/java/org/apache/falcon/catalog/CatalogPartitionHandlerIT.java
+++ b/webapp/src/test/java/org/apache/falcon/catalog/CatalogPartitionHandlerIT.java
@@ -24,6 +24,7 @@ import org.apache.falcon.util.OozieTestUtils;
 import org.apache.hive.hcatalog.api.HCatPartition;
 import org.apache.oozie.client.WorkflowJob;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -45,6 +46,11 @@ public class CatalogPartitionHandlerIT {
         TestContext.prepare();
     }
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     // TODO : Enable this after oozie/hadoop config file changes
     @Test(enabled = false)
     public void testPartitionRegistration() throws Exception {

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/catalog/HiveCatalogServiceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/catalog/HiveCatalogServiceIT.java b/webapp/src/test/java/org/apache/falcon/catalog/HiveCatalogServiceIT.java
index 5faf5b5..4d5ebf3 100644
--- a/webapp/src/test/java/org/apache/falcon/catalog/HiveCatalogServiceIT.java
+++ b/webapp/src/test/java/org/apache/falcon/catalog/HiveCatalogServiceIT.java
@@ -125,6 +125,7 @@ public class HiveCatalogServiceIT {
         dropTable(EXTERNAL_TABLE_NAME);
         dropTable(TABLE_NAME);
         dropDatabase();
+        TestContext.deleteEntitiesFromStore();
     }
 
     private void dropTable(String tableName) throws Exception {

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java b/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
index 5ed0a4e..577b60d 100644
--- a/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
+++ b/webapp/src/test/java/org/apache/falcon/cli/FalconCLIIT.java
@@ -24,6 +24,7 @@ import org.apache.falcon.metadata.RelationshipType;
 import org.apache.falcon.resource.TestContext;
 import org.apache.falcon.util.OozieTestUtils;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
@@ -54,6 +55,11 @@ public class FalconCLIIT {
         TestContext.prepare();
     }
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     public void testSubmitEntityValidCommands() throws Exception {
 
         FalconCLI.OUT.set(stream);

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/cli/FalconCLISmokeIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/cli/FalconCLISmokeIT.java b/webapp/src/test/java/org/apache/falcon/cli/FalconCLISmokeIT.java
index 7c1a42e..8a5c440 100644
--- a/webapp/src/test/java/org/apache/falcon/cli/FalconCLISmokeIT.java
+++ b/webapp/src/test/java/org/apache/falcon/cli/FalconCLISmokeIT.java
@@ -22,6 +22,7 @@ import org.apache.falcon.resource.TestContext;
 import org.apache.falcon.util.OozieTestUtils;
 import org.apache.falcon.util.StartupProperties;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
@@ -43,6 +44,11 @@ public class FalconCLISmokeIT {
                 services + ",org.apache.falcon.metadata.MetadataMappingService");
     }
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     @Test
     public void testSubmitAndScheduleEntityValidCommands() throws Exception {
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/late/LateDataHandlerIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/late/LateDataHandlerIT.java b/webapp/src/test/java/org/apache/falcon/late/LateDataHandlerIT.java
index ed85db0..9cf766c 100644
--- a/webapp/src/test/java/org/apache/falcon/late/LateDataHandlerIT.java
+++ b/webapp/src/test/java/org/apache/falcon/late/LateDataHandlerIT.java
@@ -104,6 +104,7 @@ public class LateDataHandlerIT {
         HiveTestUtils.dropDatabase(metastoreUrl, DATABASE_NAME);
 
         cleanupFS();
+        TestContext.deleteEntitiesFromStore();
     }
 
     private void cleanupFS() throws IOException {

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/lifecycle/FileSystemFeedReplicationIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/lifecycle/FileSystemFeedReplicationIT.java
b/webapp/src/test/java/org/apache/falcon/lifecycle/FileSystemFeedReplicationIT.java
index d7f36da..30e74b7 100644
--- a/webapp/src/test/java/org/apache/falcon/lifecycle/FileSystemFeedReplicationIT.java
+++ b/webapp/src/test/java/org/apache/falcon/lifecycle/FileSystemFeedReplicationIT.java
@@ -104,16 +104,13 @@ public class FileSystemFeedReplicationIT {
 
     @AfterClass
     public void tearDown() throws Exception {
-        TestContext.executeWithURL("entity -delete -type feed -name customer-fs-replicating-feed");
-        TestContext.executeWithURL("entity -delete -type cluster -name primary-cluster");
-        TestContext.executeWithURL("entity -delete -type cluster -name bcp-cluster");
-
         cleanupStagingDirs(sourceContext.getCluster().getCluster());
         cleanupStagingDirs(targetContext.getCluster().getCluster());
 
         cleanupStagingDirs(targetAlphaContext.getCluster().getCluster());
         cleanupStagingDirs(targetBetaContext.getCluster().getCluster());
         cleanupStagingDirs(targetGammaContext.getCluster().getCluster());
+        TestContext.deleteEntitiesFromStore();
     }
 
     private void cleanupStagingDirs(Cluster cluster) throws IOException {

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedEvictorIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedEvictorIT.java
b/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedEvictorIT.java
index 2a14ae4..d1faec5 100644
--- a/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedEvictorIT.java
+++ b/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedEvictorIT.java
@@ -34,6 +34,7 @@ import org.apache.hive.hcatalog.api.HCatClient;
 import org.apache.hive.hcatalog.api.HCatPartition;
 import org.apache.hive.hcatalog.common.HCatException;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -106,6 +107,11 @@ public class TableStorageFeedEvictorIT {
                 multiColDatedPartitionKeys, MULTI_COL_DATED_EXTERNAL_TABLE_LOCATION);
     }
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     @DataProvider (name = "evictorTestDataProvider")
     private Object[][] createEvictorTestData() {
         return new Object[][] {

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedReplicationIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedReplicationIT.java
b/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedReplicationIT.java
index 13bc480..49c3d48 100644
--- a/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedReplicationIT.java
+++ b/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedReplicationIT.java
@@ -125,6 +125,7 @@ public class TableStorageFeedReplicationIT {
 
         cleanupStagingDirs(sourceContext.getCluster().getCluster(), SOURCE_DATABASE_NAME);
         cleanupStagingDirs(targetContext.getCluster().getCluster(), TARGET_DATABASE_NAME);
+        TestContext.deleteEntitiesFromStore();
     }
 
     private void cleanupHiveMetastore(String metastoreUrl, String databaseName, String tableName)
throws Exception {

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/process/PigProcessIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/process/PigProcessIT.java b/webapp/src/test/java/org/apache/falcon/process/PigProcessIT.java
index 575b870..889544a 100644
--- a/webapp/src/test/java/org/apache/falcon/process/PigProcessIT.java
+++ b/webapp/src/test/java/org/apache/falcon/process/PigProcessIT.java
@@ -31,6 +31,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.oozie.client.OozieClient;
 import org.apache.oozie.client.WorkflowJob;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
@@ -69,6 +70,11 @@ public class PigProcessIT {
         copyLibsToHDFS(cluster, storageUrl);
     }
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     private void copyDataAndScriptsToHDFS(String storageUrl) throws IOException {
         // copyPigScriptToHDFS
         FSUtils.copyResourceToHDFS(

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/process/TableStorageProcessIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/process/TableStorageProcessIT.java b/webapp/src/test/java/org/apache/falcon/process/TableStorageProcessIT.java
index 2e882ea..8c4047f 100644
--- a/webapp/src/test/java/org/apache/falcon/process/TableStorageProcessIT.java
+++ b/webapp/src/test/java/org/apache/falcon/process/TableStorageProcessIT.java
@@ -134,9 +134,7 @@ public class TableStorageProcessIT {
 
         cleanupFS(context.getCluster().getCluster());
 
-        TestContext.executeWithURL("entity -delete -type feed -name output-table");
-        TestContext.executeWithURL("entity -delete -type feed -name input-table");
-        TestContext.executeWithURL("entity -delete -type cluster -name primary-cluster");
+        TestContext.deleteEntitiesFromStore();
     }
 
     private void cleanupFS(Cluster cluster) throws IOException {

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java b/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java
index 50d5b94..6d375c0 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java
@@ -45,6 +45,7 @@ import org.apache.oozie.client.Job;
 import org.apache.oozie.client.Job.Status;
 import org.apache.oozie.client.OozieClient;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -86,6 +87,11 @@ public class EntityManagerJerseyIT {
         TestContext.prepare();
     }
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     static void assertLibs(FileSystem fs, Path path) throws IOException {
         FileStatus[] libs = fs.listStatus(path);
         Assert.assertNotNull(libs);

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseySmokeIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseySmokeIT.java
b/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseySmokeIT.java
index d4a1d8a..2bedb88 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseySmokeIT.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseySmokeIT.java
@@ -24,6 +24,7 @@ import org.apache.falcon.entity.v0.process.Property;
 import org.apache.falcon.util.OozieTestUtils;
 import org.apache.oozie.client.BundleJob;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -46,6 +47,11 @@ public class EntityManagerJerseySmokeIT {
         TestContext.prepare();
     }
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     private ThreadLocal<TestContext> contexts = new ThreadLocal<TestContext>();
 
     private TestContext newContext() {

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/resource/EntityManagerPaginationJerseyIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/EntityManagerPaginationJerseyIT.java
b/webapp/src/test/java/org/apache/falcon/resource/EntityManagerPaginationJerseyIT.java
index fd78b4b..75ed59c 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/EntityManagerPaginationJerseyIT.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/EntityManagerPaginationJerseyIT.java
@@ -21,6 +21,7 @@ package org.apache.falcon.resource;
 import com.sun.jersey.api.client.ClientResponse;
 import org.apache.falcon.util.OozieTestUtils;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -42,6 +43,11 @@ public class EntityManagerPaginationJerseyIT {
         scheduleMultipleProcess(5);
     }
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     @AfterMethod
     public void cleanup() throws Exception {
         OozieTestUtils.killOozieJobs(context);

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/resource/MetadataResourceJerseyIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/MetadataResourceJerseyIT.java
b/webapp/src/test/java/org/apache/falcon/resource/MetadataResourceJerseyIT.java
index 8594603..749dfa5 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/MetadataResourceJerseyIT.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/MetadataResourceJerseyIT.java
@@ -24,6 +24,7 @@ import org.apache.falcon.resource.metadata.AbstractMetadataResource;
 import org.apache.falcon.util.DeploymentUtil;
 import org.json.simple.JSONValue;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
@@ -60,6 +61,11 @@ public class MetadataResourceJerseyIT {
         context.assertSuccessful(response);
     }
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     @Test
     public void testMetadataDiscoveryResourceList() throws Exception {
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/resource/ProcessInstanceManagerIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/ProcessInstanceManagerIT.java
b/webapp/src/test/java/org/apache/falcon/resource/ProcessInstanceManagerIT.java
index d13caae..ffc203e 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/ProcessInstanceManagerIT.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/ProcessInstanceManagerIT.java
@@ -32,6 +32,7 @@ import org.apache.falcon.workflow.engine.OozieClientFactory;
 import org.apache.oozie.client.OozieClient;
 import org.apache.oozie.client.WorkflowJob;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.Test;
 
 import javax.ws.rs.core.MediaType;
@@ -43,6 +44,11 @@ import javax.ws.rs.core.MediaType;
 public class ProcessInstanceManagerIT {
     private static final String START_INSTANCE = "2012-04-20T00:00Z";
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     protected void schedule(TestContext context) throws Exception {
         CurrentUser.authenticate(System.getProperty("user.name"));
         schedule(context, 1);

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/TestContext.java b/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
index c9e9d4f..d067dee 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
@@ -587,6 +587,14 @@ public class TestContext {
         }
     }
 
+    public static void deleteEntitiesFromStore() throws Exception {
+        for (EntityType type : EntityType.values()) {
+            for (String name : ConfigurationStore.get().getEntities(type)) {
+                executeWithURL("entity -delete -type " + type.name().toLowerCase() + " -name
" + name);
+            }
+        }
+    }
+
     public static int executeWithURL(String command) throws Exception {
         return new FalconCLI().run((command + " -url " + TestContext.BASE_URL).split("\\s+"));
     }

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/validation/ClusterEntityValidationIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/validation/ClusterEntityValidationIT.java
b/webapp/src/test/java/org/apache/falcon/validation/ClusterEntityValidationIT.java
index 8e0bf6d..402381d 100644
--- a/webapp/src/test/java/org/apache/falcon/validation/ClusterEntityValidationIT.java
+++ b/webapp/src/test/java/org/apache/falcon/validation/ClusterEntityValidationIT.java
@@ -36,6 +36,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.permission.FsAction;
 import org.apache.hadoop.fs.permission.FsPermission;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -78,6 +79,11 @@ public class ClusterEntityValidationIT {
         fs = FileSystem.get(ClusterHelper.getConfiguration(cluster));
     }
 
+    @AfterClass
+    public void tearDown() throws Exception {
+        TestContext.deleteEntitiesFromStore();
+    }
+
     /**
      * Positive test.
      *

http://git-wip-us.apache.org/repos/asf/falcon/blob/057440ad/webapp/src/test/java/org/apache/falcon/validation/FeedEntityValidationIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/validation/FeedEntityValidationIT.java
b/webapp/src/test/java/org/apache/falcon/validation/FeedEntityValidationIT.java
index f6d941c..412f94e 100644
--- a/webapp/src/test/java/org/apache/falcon/validation/FeedEntityValidationIT.java
+++ b/webapp/src/test/java/org/apache/falcon/validation/FeedEntityValidationIT.java
@@ -65,6 +65,7 @@ public class FeedEntityValidationIT {
     public void tearDown() throws Exception {
         HiveTestUtils.dropTable(METASTORE_URL, DATABASE_NAME, TABLE_NAME);
         HiveTestUtils.dropDatabase(METASTORE_URL, DATABASE_NAME);
+        TestContext.deleteEntitiesFromStore();
     }
 
     /**


Mime
View raw message