You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by ro...@apache.org on 2014/10/30 14:52:42 UTC

git commit: FALCON-848 ListEntitiesTest tagged and checkstyle bugs fixed. Contributed by Ruslan Ostafiychuk

Repository: incubator-falcon
Updated Branches:
  refs/heads/master 2bcc9f9f8 -> b202406f5


FALCON-848 ListEntitiesTest tagged and checkstyle bugs fixed. Contributed by Ruslan Ostafiychuk


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

Branch: refs/heads/master
Commit: b202406f5946a4cd34be19c23caa072459689afe
Parents: 2bcc9f9
Author: Ruslan Ostafiychuk <ro...@apache.org>
Authored: Thu Oct 30 15:51:36 2014 +0200
Committer: Ruslan Ostafiychuk <ro...@apache.org>
Committed: Thu Oct 30 15:51:36 2014 +0200

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                   |  2 ++
 .../regression/entity/ListEntitiesTest.java     | 22 ++++++++++----------
 2 files changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b202406f/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index f022331..39fcb9b 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -129,6 +129,8 @@ Trunk (Unreleased)
    FALCON-681 delete duplicate feed retention test from falcon regression (SamarthG)
 
   BUG FIXES
+   FALCON-848 ListEntitiesTest tagged and checkstyle bugs fixed (Ruslan Ostafiychuk)
+
    FALCON-832 more edge labels and node type for lineage (Raghav Kumar Gautam via Ruslan
    Ostafiychuk)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b202406f/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/entity/ListEntitiesTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/entity/ListEntitiesTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/entity/ListEntitiesTest.java
index 512fc52..d1ae4f0 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/entity/ListEntitiesTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/entity/ListEntitiesTest.java
@@ -50,9 +50,9 @@ import java.util.List;
 import java.util.Random;
 
 /**
- * Testing the list entities API
+ * Testing the list entities API.
  */
-
+@Test(groups = "embedded")
 public class ListEntitiesTest extends BaseTestClass {
     private static final Logger LOGGER = Logger.getLogger(ListEntitiesTest.class);
     private String testDir = "/ListEntitiesTest";
@@ -135,8 +135,8 @@ public class ListEntitiesTest extends BaseTestClass {
     @Test(dataProvider = "getHelpers")
     public void listEntitiesWithFilterByStatus(IEntityManagerHelper helper)
         throws AuthenticationException, IOException, URISyntaxException {
-        String[] statuses = helper.getEntityType().equalsIgnoreCase("cluster") ?
-            new String[]{"SUBMITTED"} : new String[]{"SUBMITTED", "RUNNING"};
+        String[] statuses = helper.getEntityType().equalsIgnoreCase("cluster")
+            ? new String[]{"SUBMITTED"} : new String[]{"SUBMITTED", "RUNNING"};
 
         List<EntityResult> allEntities =
             helper.listAllEntities("fields=status", null).getEntitiesResult().getEntities();
@@ -179,7 +179,7 @@ public class ListEntitiesTest extends BaseTestClass {
             List<EntityResult> entities =
                 helper.listEntities("offset=" + i, null).getEntitiesResult().getEntities();
             LOGGER.info(String.format("%s entities with offset %d: %s",
-                helper.getEntityType(), i,entities));
+                helper.getEntityType(), i, entities));
 
             Assert.assertEquals(entities.size(),
                 allEntitiesCount - i < 10 ? allEntitiesCount - i : 10,
@@ -229,7 +229,7 @@ public class ListEntitiesTest extends BaseTestClass {
         for (EntityResult entity : allEntities) {
             for (int i = 0; i < tags.length; i++) {
                 if (entity.tag != null && entity.tag.contains(tags[i])) {
-                   counters[i]++;
+                    counters[i]++;
                 }
             }
         }
@@ -261,10 +261,10 @@ public class ListEntitiesTest extends BaseTestClass {
             null).getEntitiesResult().getEntities();
         SoftAssert softAssert = new SoftAssert();
         for (EntityResult entity : entities) {
-                softAssert.assertEquals(entity.status, "SUBMITTED",
-                    "Entities should have status 'SUBMITTED'");
-                softAssert.assertTrue(entity.tag.contains(tags[2]), "There is entity without tag="
-                    + tags[2] + " Entity: " + entity);
+            softAssert.assertEquals(entity.status, "SUBMITTED",
+                "Entities should have status 'SUBMITTED'");
+            softAssert.assertTrue(entity.tag.contains(tags[2]), "There is entity without tag="
+                + tags[2] + " Entity: " + entity);
         }
         softAssert.assertTrue(entities.size() <= 3, "Number of results should be 3 or less");
         softAssert.assertTrue(Ordering.from(NAME_COMPARATOR).isOrdered(entities),
@@ -278,7 +278,7 @@ public class ListEntitiesTest extends BaseTestClass {
         return new Object[][]{
             {prism.getProcessHelper()},
             {prism.getClusterHelper()},
-            {prism.getFeedHelper()}
+            {prism.getFeedHelper()},
         };
     }