falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srik...@apache.org
Subject [1/2] incubator-falcon git commit: FALCON-807 Fix order of actual and expected expression in assert statements in webapp module. Contributed by Ajay Yadav
Date Fri, 28 Nov 2014 02:36:57 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master cc9909ae5 -> 4e7a552dc


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4e7a552d/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 92ff8ac..9383026 100644
--- a/webapp/src/test/java/org/apache/falcon/lifecycle/FileSystemFeedReplicationIT.java
+++ b/webapp/src/test/java/org/apache/falcon/lifecycle/FileSystemFeedReplicationIT.java
@@ -124,17 +124,17 @@ public class FileSystemFeedReplicationIT {
     public void testFSReplicationSingleSourceToTarget() throws Exception {
         final Map<String, String> overlay = sourceContext.getUniqueOverlay();
         String filePath = TestContext.overlayParametersOverTemplate("/table/primary-cluster.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/bcp-cluster.xml", overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         // verify if the partition on the source exists - precondition
         FileSystem sourceFS = FileSystem.get(ClusterHelper.getConfiguration(sourceContext.getCluster().getCluster()));
         Assert.assertTrue(sourceFS.exists(new Path(SOURCE_LOCATION + PARTITION_VALUE)));
 
         filePath = TestContext.overlayParametersOverTemplate("/table/customer-fs-replicating-feed.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submitAndSchedule -type
feed -file " + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submitAndSchedule -type feed
-file " + filePath), 0);
 
         // wait until the workflow job completes
         final String feedName = "customer-fs-replicating-feed";
@@ -162,23 +162,23 @@ public class FileSystemFeedReplicationIT {
     public void testFSReplicationSingleSourceToMultipleTargets() throws Exception {
         final Map<String, String> overlay = sourceContext.getUniqueOverlay();
         String filePath = TestContext.overlayParametersOverTemplate("/table/primary-cluster.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/target-cluster-alpha.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/target-cluster-beta.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/target-cluster-gamma.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         // verify if the partition on the source exists - precondition
         FileSystem sourceFS = FileSystem.get(ClusterHelper.getConfiguration(sourceContext.getCluster().getCluster()));
         Assert.assertTrue(sourceFS.exists(new Path(SOURCE_LOCATION + PARTITION_VALUE)));
 
         filePath = TestContext.overlayParametersOverTemplate("/table/multiple-targets-replicating-feed.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submitAndSchedule -type
feed -file " + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submitAndSchedule -type feed
-file " + filePath), 0);
 
         // wait until the workflow job completes
         final String feedName = "multiple-targets-replicating-feed";
@@ -227,19 +227,19 @@ public class FileSystemFeedReplicationIT {
 
         final Map<String, String> overlay = sourceContext.getUniqueOverlay();
         String filePath = TestContext.overlayParametersOverTemplate("/table/primary-cluster.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/target-cluster-alpha.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/target-cluster-beta.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         // verify if the partition on the source exists - precondition
         Assert.assertTrue(sourceFS.exists(sourcePath));
 
         filePath = TestContext.overlayParametersOverTemplate("/table/complex-replicating-feed.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submitAndSchedule -type
feed -file " + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submitAndSchedule -type feed
-file " + filePath), 0);
 
         // wait until the workflow job completes
         final String feedName = "complex-replicating-feed";

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4e7a552d/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 219de3f..181ed05 100644
--- a/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedReplicationIT.java
+++ b/webapp/src/test/java/org/apache/falcon/lifecycle/TableStorageFeedReplicationIT.java
@@ -145,17 +145,17 @@ public class TableStorageFeedReplicationIT {
         final String feedName = "customer-table-replicating-feed";
         final Map<String, String> overlay = sourceContext.getUniqueOverlay();
         String filePath = TestContext.overlayParametersOverTemplate("/table/primary-cluster.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/bcp-cluster.xml", overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         HCatPartition sourcePartition = HiveTestUtils.getPartition(
                 sourceMetastoreUrl, SOURCE_DATABASE_NAME, SOURCE_TABLE_NAME, "ds", PARTITION_VALUE);
         Assert.assertNotNull(sourcePartition);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/customer-table-replicating-feed.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submitAndSchedule -type
feed -file " + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submitAndSchedule -type feed
-file " + filePath), 0);
 
         // wait until the workflow job completes
         WorkflowJob jobInfo = OozieTestUtils.getWorkflowJob(targetContext.getCluster().getCluster(),
@@ -183,10 +183,10 @@ public class TableStorageFeedReplicationIT {
         final String feedName = "customer-table-replicating-feed";
         final Map<String, String> overlay = sourceContext.getUniqueOverlay();
         String filePath = TestContext.overlayParametersOverTemplate("/table/primary-cluster.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/bcp-cluster.xml", overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         HCatPartition sourcePartition = HiveTestUtils.getPartition(
                 sourceMetastoreUrl, SOURCE_DATABASE_NAME, SOURCE_TABLE_NAME, "ds", PARTITION_VALUE);
@@ -200,7 +200,7 @@ public class TableStorageFeedReplicationIT {
         Assert.assertNotNull(targetPartition);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/customer-table-replicating-feed.xml",
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submitAndSchedule -type
feed -file " + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submitAndSchedule -type feed
-file " + filePath), 0);
 
         // wait until the workflow job completes
         WorkflowJob jobInfo = OozieTestUtils.getWorkflowJob(targetContext.getCluster().getCluster(),

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4e7a552d/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 0f2a971..edbe32a 100644
--- a/webapp/src/test/java/org/apache/falcon/process/PigProcessIT.java
+++ b/webapp/src/test/java/org/apache/falcon/process/PigProcessIT.java
@@ -89,27 +89,24 @@ public class PigProcessIT {
         overlay.put("cluster", "primary-cluster");
 
         String filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_TEMPLATE,
overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
         // context.setCluster(filePath);
 
         filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1,
overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submit -type feed -file " + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type feed -file "
+ filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE2,
overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submit -type feed -file " + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type feed -file "
+ filePath), 0);
 
         final String pigProcessName = "pig-" + context.getProcessName();
         overlay.put("processName", pigProcessName);
 
         filePath = TestContext.overlayParametersOverTemplate(TestContext.PIG_PROCESS_TEMPLATE,
overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type process -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submitAndSchedule -type process
-file " + filePath), 0);
 
         WorkflowJob jobInfo = OozieTestUtils.getWorkflowJob(context.getCluster().getCluster(),
                 OozieClient.FILTER_NAME + "=FALCON_PROCESS_DEFAULT_" + pigProcessName);
-        Assert.assertEquals(WorkflowJob.Status.SUCCEEDED, jobInfo.getStatus());
+        Assert.assertEquals(jobInfo.getStatus(), WorkflowJob.Status.SUCCEEDED);
 
         InstancesResult response = context.getService().path("api/instance/running/process/"
+ pigProcessName)
                 .header("Cookie", context.getAuthenticationToken())

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4e7a552d/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 51afbb8..b27b692 100644
--- a/webapp/src/test/java/org/apache/falcon/process/TableStorageProcessIT.java
+++ b/webapp/src/test/java/org/apache/falcon/process/TableStorageProcessIT.java
@@ -118,15 +118,13 @@ public class TableStorageProcessIT {
         overlay.put("cluster", "primary-cluster");
 
         String filePath = TestContext.overlayParametersOverTemplate(CLUSTER_TEMPLATE, overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submit -type cluster -file
" + filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/table-feed-input.xml",
overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type feed -file "
+ filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submitAndSchedule -type feed
-file " + filePath), 0);
 
         filePath = TestContext.overlayParametersOverTemplate("/table/table-feed-output.xml",
overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type feed -file "
+ filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submitAndSchedule -type feed
-file " + filePath), 0);
     }
 
     @AfterClass
@@ -162,8 +160,7 @@ public class TableStorageProcessIT {
         overlay.put("processName", pigProcessName);
 
         String filePath = TestContext.overlayParametersOverTemplate("/table/pig-process-tables.xml",
overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type process -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submitAndSchedule -type process
-file " + filePath), 0);
 
         WorkflowJob jobInfo = OozieTestUtils.getWorkflowJob(context.getCluster().getCluster(),
                 OozieClient.FILTER_NAME + "=FALCON_PROCESS_DEFAULT_" + pigProcessName);
@@ -189,8 +186,7 @@ public class TableStorageProcessIT {
         overlay.put("processName", hiveProcessName);
 
         String filePath = TestContext.overlayParametersOverTemplate("/table/hive-process-template.xml",
overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type process -file
" + filePath));
+        Assert.assertEquals(TestContext.executeWithURL("entity -submitAndSchedule -type process
-file " + filePath), 0);
 
         WorkflowJob jobInfo = OozieTestUtils.getWorkflowJob(context.getCluster().getCluster(),
                 OozieClient.FILTER_NAME + "=FALCON_PROCESS_DEFAULT_" + hiveProcessName);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4e7a552d/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 863b109..6e58064 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/ProcessInstanceManagerIT.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/ProcessInstanceManagerIT.java
@@ -63,9 +63,9 @@ public class ProcessInstanceManagerIT {
                 .header("Cookie", context.getAuthenticationToken())
                 .accept(MediaType.APPLICATION_JSON)
                 .get(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
-        Assert.assertEquals(1, response.getInstances().length);
+        Assert.assertEquals(response.getInstances().length, 1);
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.RUNNING);
     }
 
@@ -77,7 +77,7 @@ public class ProcessInstanceManagerIT {
                 .header("Cookie", context.getAuthenticationToken())
                 .accept(MediaType.APPLICATION_JSON)
                 .get(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.RUNNING);
 
@@ -87,9 +87,9 @@ public class ProcessInstanceManagerIT {
                 .header("Cookie", context.getAuthenticationToken())
                 .accept(MediaType.APPLICATION_JSON)
                 .get(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
-        Assert.assertEquals(1, response.getInstances().length);
+        Assert.assertEquals(response.getInstances().length, 1);
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.RUNNING);
     }
 
@@ -109,9 +109,9 @@ public class ProcessInstanceManagerIT {
                 .header("Cookie", context.getAuthenticationToken())
                 .accept(MediaType.APPLICATION_JSON)
                 .get(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
-        Assert.assertEquals(1, response.getInstances().length);
+        Assert.assertEquals(response.getInstances().length, 1);
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.RUNNING);
     }
 
@@ -127,9 +127,9 @@ public class ProcessInstanceManagerIT {
                 .header("Cookie", context.getAuthenticationToken())
                 .accept(MediaType.APPLICATION_JSON)
                 .get(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
-        Assert.assertEquals(1, response.getInstances().length);
+        Assert.assertEquals(response.getInstances().length, 1);
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.RUNNING);
     }
 
@@ -142,9 +142,9 @@ public class ProcessInstanceManagerIT {
                 .accept(MediaType.APPLICATION_JSON)
                 .post(InstancesResult.class);
 
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
-        Assert.assertEquals(1, response.getInstances().length);
+        Assert.assertEquals(response.getInstances().length, 1);
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.RUNNING);
 
         waitForWorkflow(START_INSTANCE, WorkflowJob.Status.RUNNING);
@@ -158,9 +158,9 @@ public class ProcessInstanceManagerIT {
                 .header("Cookie", context.getAuthenticationToken())
                 .accept(MediaType.APPLICATION_JSON)
                 .post(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
-        Assert.assertEquals(1, response.getInstances().length);
+        Assert.assertEquals(response.getInstances().length, 1);
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.KILLED);
 
         response = context.service.path("api/instance/status/process/" + context.processName)
@@ -169,9 +169,9 @@ public class ProcessInstanceManagerIT {
                 .header("Cookie", context.getAuthenticationToken())
                 .accept(MediaType.APPLICATION_JSON)
                 .get(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
-        Assert.assertEquals(1, response.getInstances().length);
+        Assert.assertEquals(response.getInstances().length, 1);
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.KILLED);
 
         response = context.service.path("api/instance/status/process/" + context.processName)
@@ -180,9 +180,9 @@ public class ProcessInstanceManagerIT {
                 .header("Cookie", context.getAuthenticationToken())
                 .accept(MediaType.APPLICATION_JSON)
                 .get(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
-        Assert.assertEquals(1, response.getInstances().length);
+        Assert.assertEquals(response.getInstances().length, 1);
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.KILLED);
 
         waitForWorkflow(START_INSTANCE, WorkflowJob.Status.KILLED);
@@ -196,9 +196,9 @@ public class ProcessInstanceManagerIT {
                 .header("Cookie", context.getAuthenticationToken())
                 .accept(MediaType.APPLICATION_JSON)
                 .post(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
-        Assert.assertEquals(1, response.getInstances().length);
+        Assert.assertEquals(response.getInstances().length, 1);
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.SUSPENDED);
 
         waitForWorkflow(START_INSTANCE, WorkflowJob.Status.SUSPENDED);
@@ -213,9 +213,9 @@ public class ProcessInstanceManagerIT {
                 .header("Cookie", context.getAuthenticationToken())
                 .accept(MediaType.APPLICATION_JSON)
                 .post(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
+        Assert.assertEquals(response.getStatus(), APIResult.Status.SUCCEEDED);
         Assert.assertNotNull(response.getInstances());
-        Assert.assertEquals(1, response.getInstances().length);
+        Assert.assertEquals(response.getInstances().length, 1);
         assertInstance(response.getInstances()[0], START_INSTANCE, WorkflowStatus.RUNNING);
 
         waitForWorkflow(START_INSTANCE, WorkflowJob.Status.RUNNING);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/4e7a552d/webapp/src/test/java/org/apache/falcon/util/ResourcesReflectionUtilTest.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/util/ResourcesReflectionUtilTest.java
b/webapp/src/test/java/org/apache/falcon/util/ResourcesReflectionUtilTest.java
index bd63a07..d3653df 100644
--- a/webapp/src/test/java/org/apache/falcon/util/ResourcesReflectionUtilTest.java
+++ b/webapp/src/test/java/org/apache/falcon/util/ResourcesReflectionUtilTest.java
@@ -45,9 +45,8 @@ public class ResourcesReflectionUtilTest {
 
         Assert.assertEquals("wf-instance-failed",
                 ResourcesReflectionUtil.getResourceMonitorName("GenericAlert.instrumentFailedInstance"));
-        Assert.assertEquals(new Integer(11),
-                ResourcesReflectionUtil.getResourceTimeTakenName("GenericAlert.instrumentFailedInstance"));
-        Assert.assertEquals(null,
-                ResourcesReflectionUtil.getResourceTimeTakenName("GenericAlert.alertLateRerunFailed"));
+        Assert.assertEquals(ResourcesReflectionUtil.getResourceTimeTakenName("GenericAlert.instrumentFailedInstance"),
+                new Integer(11));
+        Assert.assertNull(ResourcesReflectionUtil.getResourceTimeTakenName("GenericAlert.alertLateRerunFailed"));
     }
 }


Mime
View raw message