From b35b00dcc49d7d74c1dce3d0f5dbec039bb8110c Mon Sep 17 00:00:00 2001 From: sonia-garudi Date: Fri, 11 May 2018 17:43:45 +0530 Subject: [PATCH 1/2] Edit EntityGraphTest.java to delete the config store before and after suite --- .../falcon/entity/v0/EntityGraphTest.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/common/src/test/java/org/apache/falcon/entity/v0/EntityGraphTest.java b/common/src/test/java/org/apache/falcon/entity/v0/EntityGraphTest.java index 20f2871d8..09cca5298 100644 --- a/common/src/test/java/org/apache/falcon/entity/v0/EntityGraphTest.java +++ b/common/src/test/java/org/apache/falcon/entity/v0/EntityGraphTest.java @@ -49,6 +49,16 @@ import java.util.List; import java.util.Set; +import org.apache.falcon.util.StartupProperties; +import org.apache.hadoop.conf.Configuration; +import org.testng.annotations.AfterSuite; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeSuite; +import org.testng.annotations.Test; +import java.io.IOException; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; + /** * Entity graph tests. */ @@ -475,4 +485,16 @@ public void testOnRemoveDatasource() throws Exception { Assert.assertEquals(1, entities.size()); Assert.assertTrue(entities.contains(cluster)); } + + @BeforeSuite + @AfterSuite + public void cleanup() throws IOException { + Path path = new Path(StartupProperties.get(). + getProperty("config.store.uri")); + FileSystem fs = FileSystem.get(path.toUri(), new Configuration()); + fs.delete(path, true); + System.out.println("Cleaned up " + path); + } + + } From 54b15f90a054a83e51ad5e06dc4b0a77e9c0934a Mon Sep 17 00:00:00 2001 From: sonia-garudi Date: Mon, 14 May 2018 09:03:14 +0530 Subject: [PATCH 2/2] Removed unused and duplicate import statements --- .../test/java/org/apache/falcon/entity/v0/EntityGraphTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/src/test/java/org/apache/falcon/entity/v0/EntityGraphTest.java b/common/src/test/java/org/apache/falcon/entity/v0/EntityGraphTest.java index 09cca5298..7cdd6c71a 100644 --- a/common/src/test/java/org/apache/falcon/entity/v0/EntityGraphTest.java +++ b/common/src/test/java/org/apache/falcon/entity/v0/EntityGraphTest.java @@ -52,9 +52,7 @@ import org.apache.falcon.util.StartupProperties; import org.apache.hadoop.conf.Configuration; import org.testng.annotations.AfterSuite; -import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeSuite; -import org.testng.annotations.Test; import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;