Author: cutting
Date: Thu Feb 21 17:30:51 2013
New Revision: 1448730

URL: http://svn.apache.org/r1448730
Log:
AVRO-1254. Fix Trevni mapreduce tests to not depend on order, which is no 
longer guaranteed under Java 7.

Modified:
    
avro/tags/release-1.7.4-rc0/lang/java/trevni/avro/src/test/java/org/apache/trevni/avro/mapreduce/TestKeyValueWordCount.java
    
avro/tags/release-1.7.4-rc0/lang/java/trevni/avro/src/test/java/org/apache/trevni/avro/mapreduce/TestKeyWordCount.java

Modified: 
avro/tags/release-1.7.4-rc0/lang/java/trevni/avro/src/test/java/org/apache/trevni/avro/mapreduce/TestKeyValueWordCount.java
URL: 
http://svn.apache.org/viewvc/avro/tags/release-1.7.4-rc0/lang/java/trevni/avro/src/test/java/org/apache/trevni/avro/mapreduce/TestKeyValueWordCount.java?rev=1448730&r1=1448729&r2=1448730&view=diff
==============================================================================
--- 
avro/tags/release-1.7.4-rc0/lang/java/trevni/avro/src/test/java/org/apache/trevni/avro/mapreduce/TestKeyValueWordCount.java
 (original)
+++ 
avro/tags/release-1.7.4-rc0/lang/java/trevni/avro/src/test/java/org/apache/trevni/avro/mapreduce/TestKeyValueWordCount.java
 Thu Feb 21 17:30:51 2013
@@ -104,8 +104,12 @@ public class TestKeyValueWordCount {
     }
   }  
   
-  @Test
-  public void testKeyOutputFormat() throws Exception {
+  @Test public void testIOFormat() throws Exception {
+    checkOutputFormat();
+    checkInputFormat();
+  }
+
+  public void checkOutputFormat() throws Exception {
     Job job = new Job();
     
     WordCountUtil wordCountUtil = new 
WordCountUtil("trevniMapReduceKeyValueTest", "part-r-00000");
@@ -134,8 +138,7 @@ public class TestKeyValueWordCount {
     wordCountUtil.validateCountsFileGenericRecord();
   }
   
-  @Test
-  public void testInputFormat() throws Exception {
+  public void checkInputFormat() throws Exception {
     Job job = new Job();
     
     WordCountUtil wordCountUtil = new 
WordCountUtil("trevniMapReduceKeyValueTest");

Modified: 
avro/tags/release-1.7.4-rc0/lang/java/trevni/avro/src/test/java/org/apache/trevni/avro/mapreduce/TestKeyWordCount.java
URL: 
http://svn.apache.org/viewvc/avro/tags/release-1.7.4-rc0/lang/java/trevni/avro/src/test/java/org/apache/trevni/avro/mapreduce/TestKeyWordCount.java?rev=1448730&r1=1448729&r2=1448730&view=diff
==============================================================================
--- 
avro/tags/release-1.7.4-rc0/lang/java/trevni/avro/src/test/java/org/apache/trevni/avro/mapreduce/TestKeyWordCount.java
 (original)
+++ 
avro/tags/release-1.7.4-rc0/lang/java/trevni/avro/src/test/java/org/apache/trevni/avro/mapreduce/TestKeyWordCount.java
 Thu Feb 21 17:30:51 2013
@@ -116,8 +116,12 @@ public class TestKeyWordCount {
   }
   
   
-  @Test
-  public void testKeyOutputFormat() throws Exception {
+  @Test public void testIOFormat() throws Exception {
+    checkOutputFormat();
+    checkInputFormat();
+  }
+
+  public void checkOutputFormat() throws Exception {
     Job job = new Job();
     
     WordCountUtil wordCountUtil = new WordCountUtil("trevniMapReduceKeyTest", 
"part-r-00000");
@@ -145,8 +149,7 @@ public class TestKeyWordCount {
     wordCountUtil.validateCountsFile();
   }
   
-  @Test
-  public void testInputFormat() throws Exception {
+  public void checkInputFormat() throws Exception {
     Job job = new Job();
     
     WordCountUtil wordCountUtil = new WordCountUtil("trevniMapReduceKeyTest");


Reply via email to