crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gr...@apache.org
Subject git commit: CRUNCH-109 - Make AvroTypeTest deterministic
Date Wed, 07 Nov 2012 19:43:22 GMT
Updated Branches:
  refs/heads/master 073e4ee0c -> e9df0bc7d


CRUNCH-109 - Make AvroTypeTest deterministic


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

Branch: refs/heads/master
Commit: e9df0bc7d5f9cf6fd1c4260c859438b585f95e54
Parents: 073e4ee
Author: Gabriel Reid <greid@apache.org>
Authored: Wed Nov 7 20:41:48 2012 +0100
Committer: Gabriel Reid <greid@apache.org>
Committed: Wed Nov 7 20:41:48 2012 +0100

----------------------------------------------------------------------
 .../org/apache/crunch/types/avro/AvroTypeTest.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/e9df0bc7/crunch/src/test/java/org/apache/crunch/types/avro/AvroTypeTest.java
----------------------------------------------------------------------
diff --git a/crunch/src/test/java/org/apache/crunch/types/avro/AvroTypeTest.java b/crunch/src/test/java/org/apache/crunch/types/avro/AvroTypeTest.java
index 383ca27..a874c63 100644
--- a/crunch/src/test/java/org/apache/crunch/types/avro/AvroTypeTest.java
+++ b/crunch/src/test/java/org/apache/crunch/types/avro/AvroTypeTest.java
@@ -144,7 +144,9 @@ public class AvroTypeTest {
   @Test
   public void testGetDetachedValue_AlreadyMappedAvroType() {
     Integer value = 42;
-    Integer detachedValue = Avros.ints().getDetachedValue(value);
+    AvroType<Integer> intType = Avros.ints();
+    intType.initialize(new Configuration());
+    Integer detachedValue = intType.getDetachedValue(value);
     assertSame(value, detachedValue);
   }
 


Mime
View raw message