crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject git commit: Fix broken MapsIT integration test.
Date Fri, 02 Nov 2012 17:57:26 GMT
Updated Branches:
  refs/heads/master a547e90dc -> e3b9f520b


Fix broken MapsIT integration test.

The test has always been broken, but due to a missing assertion
nobody noticed.


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

Branch: refs/heads/master
Commit: e3b9f520b14b5ed322cc223762dfa4ac741b1cd8
Parents: a547e90
Author: Matthias Friedrich <matt@mafr.de>
Authored: Fri Nov 2 18:36:40 2012 +0100
Committer: Matthias Friedrich <matt@mafr.de>
Committed: Fri Nov 2 18:46:33 2012 +0100

----------------------------------------------------------------------
 crunch/src/it/java/org/apache/crunch/MapsIT.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/e3b9f520/crunch/src/it/java/org/apache/crunch/MapsIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/MapsIT.java b/crunch/src/it/java/org/apache/crunch/MapsIT.java
index 320aba6..5b3187b 100644
--- a/crunch/src/it/java/org/apache/crunch/MapsIT.java
+++ b/crunch/src/it/java/org/apache/crunch/MapsIT.java
@@ -17,6 +17,9 @@
  */
 package org.apache.crunch;
 
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
 import java.util.Map;
 
 import org.apache.crunch.impl.mr.MRPipeline;
@@ -83,13 +86,16 @@ public class MapsIT {
             emitter.emit(Pair.of(input.first(), agg));
           }
         }).materialize();
+
     boolean passed = false;
     for (Pair<String, Map<String, Long>> v : output) {
-      if (v.first() == "k" && v.second().get("n") == 8L) {
+      if (v.first().equals("k") && v.second().get("n") == 8L) {
         passed = true;
         break;
       }
     }
     pipeline.done();
+
+    assertThat(passed, is(true));
   }
 }


Mime
View raw message