falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shweth...@apache.org
Subject git commit: FALCON-344 FeedEvictorTest failure. Contributed by Shaik Idris Ali
Date Wed, 12 Mar 2014 09:32:55 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 6b3288621 -> 39800a097


FALCON-344 FeedEvictorTest failure. Contributed by Shaik Idris Ali


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

Branch: refs/heads/master
Commit: 39800a097867c4debd3f7d35ee2fce90187ccef4
Parents: 6b32886
Author: Shwetha GS <shwethags@gmail.com>
Authored: Wed Mar 12 15:02:46 2014 +0530
Committer: Shwetha GS <shwethags@gmail.com>
Committed: Wed Mar 12 15:02:46 2014 +0530

----------------------------------------------------------------------
 CHANGES.txt                                                     | 2 ++
 .../test/java/org/apache/falcon/retention/FeedEvictorTest.java  | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/39800a09/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7b15769..23b4354 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -75,6 +75,8 @@ Trunk (Unreleased)
     FALCON-123 Improve build speeds in falcon. (Srikanth Sundarrajan via Shwetha GS)
 
   BUG FIXES
+    FALCON-344 FeedEvictorTest. (Shaik Idris Ali via Shwetha GS)
+
     FALCON-302 Issues with distributed package properties. (Shwetha GS)
 
     FALCON-331 Summary API returning NPE if only start is passed. (Shwetha GS)

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/39800a09/retention/src/test/java/org/apache/falcon/retention/FeedEvictorTest.java
----------------------------------------------------------------------
diff --git a/retention/src/test/java/org/apache/falcon/retention/FeedEvictorTest.java b/retention/src/test/java/org/apache/falcon/retention/FeedEvictorTest.java
index 6ba19fa..1e7cc04 100644
--- a/retention/src/test/java/org/apache/falcon/retention/FeedEvictorTest.java
+++ b/retention/src/test/java/org/apache/falcon/retention/FeedEvictorTest.java
@@ -377,6 +377,7 @@ public class FeedEvictorTest {
             String dataPath = LocationType.DATA.name() + "="
                 + storageUrl + "/data/YYYY/feed1/mmHH/dd/MM/?{YEAR}/?{MONTH}/?{DAY}/more/?{YEAR}";
             String logFile = hdfsUrl + "/falcon/staging/feed/instancePaths-2012-01-01-01-00.csv";
+            long beforeDelCount = fs.getContentSummary(new Path(("/data/YYYY/feed1/mmHH/dd/MM/"))).getDirectoryCount();
 
             FeedEvictor.main(new String[]{
                 "-feedBasePath", dataPath,
@@ -401,8 +402,8 @@ public class FeedEvictorTest {
             //base path not deleted
             Assert.assertTrue(fs.exists(new Path("/data/YYYY/feed1/mmHH/dd/MM/")));
             //non-eligible empty dirs
-            Assert.assertEquals(fs.getContentSummary(new Path(("/data/YYYY/feed1/mmHH/dd/MM/"))).getDirectoryCount(),
-                34);
+            long afterDelCount = fs.getContentSummary(new Path(("/data/YYYY/feed1/mmHH/dd/MM/"))).getDirectoryCount();
+            Assert.assertEquals((beforeDelCount - afterDelCount), 19);
             for(String path: pair.second){
                 Assert.assertTrue(fs.exists(new Path(path)));
             }


Mime
View raw message