Repository: bigtop
Updated Branches:
  refs/heads/master 0f0e8842b -> 162f0a62f


BIGTOP-2549: "Expected" and "actual" values are mistakenly switched in some 
JUnit method invocation

Signed-off-by: Konstantin Boudnik <konstantin_boud...@epam.com>


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/162f0a62
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/162f0a62
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/162f0a62

Branch: refs/heads/master
Commit: 162f0a62f67c2f226ee12e0d4c9c03c6ca72c8e5
Parents: 0f0e884
Author: Kengo Seki <sek...@apache.org>
Authored: Thu Oct 6 15:54:53 2016 +0900
Committer: Konstantin Boudnik <konstantin_boud...@epam.com>
Committed: Thu Oct 13 13:17:17 2016 -0700

----------------------------------------------------------------------
 bigtop-tests/smoke-tests/tajo/TestTajo.groovy   |  2 +-
 .../itest/crunchsmoke/TestCrunchSmoke.groovy    |  2 +-
 .../apache/bigtop/itest/datafu/PigTests.java    |  2 +-
 .../itest/datafu/sessions/SessionTests.java     |  6 ++--
 .../itest/datafu/stats/QuantileTests.java       | 36 ++++++++++----------
 .../itest/datafu/stats/WilsonBinConfTests.java  |  2 +-
 .../itest/giraphsmoke/TestGiraphSmoke.groovy    | 10 +++---
 .../itest/hadoop/hdfs/TestTextSnappy.groovy     |  2 +-
 .../bigtop/itest/huesmoke/TestHueSmoke.groovy   |  2 +-
 .../itest/solr/smoke/TestIndexingSolrJ.groovy   |  4 +--
 .../bigtop/itest/spark/TestSparkSmoke.groovy    |  4 +--
 11 files changed, 36 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/smoke-tests/tajo/TestTajo.groovy
----------------------------------------------------------------------
diff --git a/bigtop-tests/smoke-tests/tajo/TestTajo.groovy 
b/bigtop-tests/smoke-tests/tajo/TestTajo.groovy
index 128e077..8e52fab 100644
--- a/bigtop-tests/smoke-tests/tajo/TestTajo.groovy
+++ b/bigtop-tests/smoke-tests/tajo/TestTajo.groovy
@@ -111,6 +111,6 @@ class TestTajo {
     } finally {
       if (rs != null) rs.close()
     }
-    assertEquals(answer.toString(), correct.toString())
+    assertEquals(correct.toString(), answer.toString())
   }
 }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/test-artifacts/crunch/src/main/groovy/org/apache/bigtop/itest/crunchsmoke/TestCrunchSmoke.groovy
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/crunch/src/main/groovy/org/apache/bigtop/itest/crunchsmoke/TestCrunchSmoke.groovy
 
b/bigtop-tests/test-artifacts/crunch/src/main/groovy/org/apache/bigtop/itest/crunchsmoke/TestCrunchSmoke.groovy
index 7edca58..b3c8d6c 100644
--- 
a/bigtop-tests/test-artifacts/crunch/src/main/groovy/org/apache/bigtop/itest/crunchsmoke/TestCrunchSmoke.groovy
+++ 
b/bigtop-tests/test-artifacts/crunch/src/main/groovy/org/apache/bigtop/itest/crunchsmoke/TestCrunchSmoke.groovy
@@ -55,7 +55,7 @@ public class TestCrunchSmoke {
       + " org.apache.crunch.examples.${algorithm}"
       + " ${examples.get(algorithm)}"
     );
-    assertEquals("running Crunch example failed", sh.getRet(), 0);
+    assertEquals("running Crunch example failed", 0, sh.getRet());
   }
 
   @Test(timeout = 300000L)

http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/PigTests.java
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/PigTests.java
 
b/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/PigTests.java
index 22e55c9..8b11111 100644
--- 
a/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/PigTests.java
+++ 
b/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/PigTests.java
@@ -170,7 +170,7 @@ public abstract class PigTests
     int i=0;
     for (String e : expected)
     {
-      assertEquals(tuples.get(i++).toString(), e);
+      assertEquals(e, tuples.get(i++).toString());
     }
   }
   

http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/sessions/SessionTests.java
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/sessions/SessionTests.java
 
b/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/sessions/SessionTests.java
index 6dfc3be..d13f1c3 100644
--- 
a/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/sessions/SessionTests.java
+++ 
b/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/sessions/SessionTests.java
@@ -73,9 +73,9 @@ public class SessionTests extends PigTests
       userValues.get(userId).put(max, true);
     }
     
-    assertEquals(userValues.get(1).size(), 2);
-    assertEquals(userValues.get(2).size(), 5);
-    assertEquals(userValues.get(3).size(), 1);    
+    assertEquals(2, userValues.get(1).size());
+    assertEquals(5, userValues.get(2).size());
+    assertEquals(1, userValues.get(3).size());
     
     assertTrue(userValues.get(1).containsKey(20));
     assertTrue(userValues.get(1).containsKey(30));

http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/stats/QuantileTests.java
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/stats/QuantileTests.java
 
b/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/stats/QuantileTests.java
index 305858c..e9ef05d 100644
--- 
a/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/stats/QuantileTests.java
+++ 
b/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/stats/QuantileTests.java
@@ -44,8 +44,8 @@ public class QuantileTests  extends PigTests
     
     List<Tuple> output = getLinesForAlias(test, "data_out", true);
     
-    assertEquals(output.size(),1);
-    assertEquals(output.get(0).toString(), "(1.0,3.0,5.5,8.0,10.0)");
+    assertEquals(1,output.size());
+    assertEquals("(1.0,3.0,5.5,8.0,10.0)", output.get(0).toString());
   }
   
   @Test
@@ -61,8 +61,8 @@ public class QuantileTests  extends PigTests
     
     List<Tuple> output = getLinesForAlias(test, "data_out", true);
     
-    assertEquals(output.size(),1);
-    assertEquals(output.get(0).toString(), "(1.0,3.0,5.5,8.0,10.0)");
+    assertEquals(1,output.size());
+    assertEquals("(1.0,3.0,5.5,8.0,10.0)", output.get(0).toString());
   }
   
   @Test
@@ -77,8 +77,8 @@ public class QuantileTests  extends PigTests
     
     List<Tuple> output = getLinesForAlias(test, "data_out", true);
     
-    assertEquals(output.size(),1);
-    assertEquals(output.get(0).toString(), "(5.5)");
+    assertEquals(1,output.size());
+    assertEquals("(5.5)", output.get(0).toString());
   }
   
   @Test
@@ -93,8 +93,8 @@ public class QuantileTests  extends PigTests
     
     List<Tuple> output = getLinesForAlias(test, "data_out", true);
     
-    assertEquals(output.size(),1);
-    assertEquals(output.get(0).toString(), "(5.0)");
+    assertEquals(1,output.size());
+    assertEquals("(5.0)", output.get(0).toString());
   }
 
   @Test
@@ -109,8 +109,8 @@ public class QuantileTests  extends PigTests
     
     List<Tuple> output = getLinesForAlias(test, "data_out", true);
     
-    assertEquals(output.size(),1);
-    assertEquals(output.get(0).toString(), "(1.0,3.0,5.0,8.0,10.0)");
+    assertEquals(1,output.size());
+    assertEquals("(1.0,3.0,5.0,8.0,10.0)", output.get(0).toString());
   }
   
   @Test
@@ -125,8 +125,8 @@ public class QuantileTests  extends PigTests
     
     List<Tuple> output = getLinesForAlias(test, "data_out", true);
     
-    assertEquals(output.size(),1);
-    assertEquals(output.get(0).toString(), "(5.0,8.0,10.0)");
+    assertEquals(1,output.size());
+    assertEquals("(5.0,8.0,10.0)", output.get(0).toString());
   }
   
   @Test
@@ -146,8 +146,8 @@ public class QuantileTests  extends PigTests
     
     List<Tuple> output = getLinesForAlias(test, "data_out", true);
     
-    assertEquals(output.size(),1);
-    assertEquals(output.get(0).toString(), "(70.0,30.0,370.0,1000.0,1.0)");
+    assertEquals(1,output.size());
+    assertEquals("(70.0,30.0,370.0,1000.0,1.0)", output.get(0).toString());
   }
   
   @Test
@@ -167,8 +167,8 @@ public class QuantileTests  extends PigTests
     
     List<Tuple> output = getLinesForAlias(test, "data_out", true);
     
-    assertEquals(output.size(),1);
-    assertEquals(output.get(0).toString(), 
"(130.0,2280.0,15870.0,50000.0,84130.0,97720.0,99870.0)");
+    assertEquals(1,output.size());
+    assertEquals("(130.0,2280.0,15870.0,50000.0,84130.0,97720.0,99870.0)", 
output.get(0).toString());
   }
   
 
@@ -190,7 +190,7 @@ public class QuantileTests  extends PigTests
     
     List<Tuple> output = getLinesForAlias(test, "data_out", true);
     
-    assertEquals(output.size(),1);
-    assertEquals(output.get(0).toString(), 
"(130.0,2280.0,15870.0,50000.0,84130.0,97720.0,99870.0)");
+    assertEquals(1,output.size());
+    assertEquals("(130.0,2280.0,15870.0,50000.0,84130.0,97720.0,99870.0)", 
output.get(0).toString());
   }
 }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/stats/WilsonBinConfTests.java
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/stats/WilsonBinConfTests.java
 
b/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/stats/WilsonBinConfTests.java
index 5811e2c..cb43ce1 100644
--- 
a/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/stats/WilsonBinConfTests.java
+++ 
b/bigtop-tests/test-artifacts/datafu/src/main/groovy/org/apache/bigtop/itest/datafu/stats/WilsonBinConfTests.java
@@ -75,7 +75,7 @@ public class WilsonBinConfTests extends PigTests
       assertTrue(expectationIterator.hasNext());
       Double lower = (Double)t.get(0);
       Double upper = (Double)t.get(1);
-      
assertEquals(String.format("%.5f,%.5f",lower,upper),expectationIterator.next());
+      
assertEquals(expectationIterator.next(),String.format("%.5f,%.5f",lower,upper));
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/test-artifacts/giraph/src/main/groovy/org/apache/bigtop/itest/giraphsmoke/TestGiraphSmoke.groovy
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/giraph/src/main/groovy/org/apache/bigtop/itest/giraphsmoke/TestGiraphSmoke.groovy
 
b/bigtop-tests/test-artifacts/giraph/src/main/groovy/org/apache/bigtop/itest/giraphsmoke/TestGiraphSmoke.groovy
index b213130..39a150e 100644
--- 
a/bigtop-tests/test-artifacts/giraph/src/main/groovy/org/apache/bigtop/itest/giraphsmoke/TestGiraphSmoke.groovy
+++ 
b/bigtop-tests/test-artifacts/giraph/src/main/groovy/org/apache/bigtop/itest/giraphsmoke/TestGiraphSmoke.groovy
@@ -42,7 +42,7 @@ public class TestGiraphSmoke {
       + " -V 100000"   // aggregate vertices
       + " -w 3"        // workers
     )
-    assertEquals("running PageRankBenchmark failed", sh.getRet(), 0);
+    assertEquals("running PageRankBenchmark failed", 0, sh.getRet());
   }
 
   @Test(timeout = 300000L)
@@ -57,7 +57,7 @@ public class TestGiraphSmoke {
       + " -n 10"       // Number of messages per edge
       + " -b 100"      // size of each message in bytes
     )
-    assertEquals("running RandomMessageBenchmark failed", sh.getRet(), 0);
+    assertEquals("running RandomMessageBenchmark failed", 0, sh.getRet());
   }
 
   @Test(timeout = 300000L)
@@ -70,7 +70,7 @@ public class TestGiraphSmoke {
       + " -w 3"        // workers
       + " -o ${testDir}"
     )
-    assertEquals("running SimpleCheckpointVertex failed", sh.getRet(), 0);
+    assertEquals("running SimpleCheckpointVertex failed", 0, sh.getRet());
   }
 
   @Test(timeout = 300000L)
@@ -80,7 +80,7 @@ public class TestGiraphSmoke {
       + " org.apache.giraph.examples.SimpleVertexWithWorkerContext"
       + " ${testDir} 3"
     )
-    assertEquals("running SimpleCheckpointVertex failed", sh.getRet(), 0);
+    assertEquals("running SimpleCheckpointVertex failed", 0, sh.getRet());
   }
 
   @Test(timeout = 300000L)
@@ -110,6 +110,6 @@ public class TestGiraphSmoke {
       + " ${testDir}/output"
       + " 0 ${graphDescription.size() / partitionSize}"
     )
-    assertEquals("running SimpleShortestPathsVertex failed", sh.getRet(), 0);
+    assertEquals("running SimpleShortestPathsVertex failed", 0, sh.getRet());
   }
 }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestTextSnappy.groovy
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestTextSnappy.groovy
 
b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestTextSnappy.groovy
index 903c868..fb4b6ec 100644
--- 
a/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestTextSnappy.groovy
+++ 
b/bigtop-tests/test-artifacts/hadoop/src/main/groovy/org/apache/bigtop/itest/hadoop/hdfs/TestTextSnappy.groovy
@@ -56,7 +56,7 @@ class TestTextSnappy {
     String expected = "1\trafferty\t31\n2\tjones\t33\n3\tsteinberg\t33"
     System.out.println("Expected output:\n${expected}")
     System.out.println("Actual output:\n${output}")
-    assertEquals("Incorrect output", output, expected)
+    assertEquals("Incorrect output", expected, output)
   }
 
 }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/TestHueSmoke.groovy
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/TestHueSmoke.groovy
 
b/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/TestHueSmoke.groovy
index 4b5a46d..f313d75 100644
--- 
a/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/TestHueSmoke.groovy
+++ 
b/bigtop-tests/test-artifacts/hue/src/main/groovy/org/apache/bigtop/itest/huesmoke/TestHueSmoke.groovy
@@ -61,6 +61,6 @@ public class TestHueSmoke {
       }
     }
     assertEquals("Application(s) ${failedApps} failed to respond",
-      failedApps.size(), 0);
+      0, failedApps.size());
   }
 }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/test-artifacts/solr/src/main/groovy/org/apache/bigtop/itest/solr/smoke/TestIndexingSolrJ.groovy
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/solr/src/main/groovy/org/apache/bigtop/itest/solr/smoke/TestIndexingSolrJ.groovy
 
b/bigtop-tests/test-artifacts/solr/src/main/groovy/org/apache/bigtop/itest/solr/smoke/TestIndexingSolrJ.groovy
index b02c072..db09e30 100644
--- 
a/bigtop-tests/test-artifacts/solr/src/main/groovy/org/apache/bigtop/itest/solr/smoke/TestIndexingSolrJ.groovy
+++ 
b/bigtop-tests/test-artifacts/solr/src/main/groovy/org/apache/bigtop/itest/solr/smoke/TestIndexingSolrJ.groovy
@@ -83,10 +83,10 @@ class TestIndexingSolrJ extends SolrTestBase {
     query.setRows(1000)
     QueryResponse qr = _server.query(query, SolrRequest.METHOD.POST)
     Object o = qr.getHeader().get("status")
-    Assert.assertEquals(qr.getHeader().get("status"), 0)
+    Assert.assertEquals(0, qr.getHeader().get("status"))
 
     SolrDocumentList sdl = qr.getResults()
-    Assert.assertEquals(sdl.size(), docIds.length)
+    Assert.assertEquals(docIds.length, sdl.size())
     for (SolrDocument doc : sdl) {
       Assert.assertTrue(docIds.contains(doc.get("id")))
     }

http://git-wip-us.apache.org/repos/asf/bigtop/blob/162f0a62/bigtop-tests/test-artifacts/spark/src/main/groovy/org/apache/bigtop/itest/spark/TestSparkSmoke.groovy
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/test-artifacts/spark/src/main/groovy/org/apache/bigtop/itest/spark/TestSparkSmoke.groovy
 
b/bigtop-tests/test-artifacts/spark/src/main/groovy/org/apache/bigtop/itest/spark/TestSparkSmoke.groovy
index 4c601a0..20cf2cb 100644
--- 
a/bigtop-tests/test-artifacts/spark/src/main/groovy/org/apache/bigtop/itest/spark/TestSparkSmoke.groovy
+++ 
b/bigtop-tests/test-artifacts/spark/src/main/groovy/org/apache/bigtop/itest/spark/TestSparkSmoke.groovy
@@ -91,8 +91,8 @@ public class TestSparkSmoke implements Serializable {
       public Boolean call(String s) { return s.contains("e"); }
     }).count();
 
-    assertEquals("Lines containing 'spark' should be 14", num_Spark, 14);
-    assertEquals("Lines containing 'e' should be 43", num_e, 43);
+    assertEquals("Lines containing 'spark' should be 14", 14, num_Spark);
+    assertEquals("Lines containing 'e' should be 43", 43, num_e);
   }
 
 }

Reply via email to