avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From th...@apache.org
Subject svn commit: r899885 - in /hadoop/avro/trunk: ./ lang/java/src/test/java/org/apache/avro/genavro/ lang/java/src/test/java/org/apache/avro/tool/
Date Sat, 16 Jan 2010 05:11:15 GMT
Author: thiru
Date: Sat Jan 16 05:11:07 2010
New Revision: 899885

URL: http://svn.apache.org/viewvc?rev=899885&view=rev
Log:
AVRO-337. ant test-java fails in Cygwin due to CRLF v LF problem

Modified:
    hadoop/avro/trunk/CHANGES.txt
    hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/TestGenAvro.java
    hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestDataFileTools.java
    hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestJsonToFromBinaryFragmentTools.java
    hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestRpcReceiveAndSendTools.java

Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=899885&r1=899884&r2=899885&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Sat Jan 16 05:11:07 2010
@@ -317,6 +317,8 @@
 
     AVRO-313. Default values for fields or records and array (or map) don't work with ResolvingDecoder
(thiru)
 
+    AVRO-337. ant test-java fails in Cygwin due to CRLF v LF problem (thiru)
+
 Avro 1.2.0 (14 October 2009)
 
   INCOMPATIBLE CHANGES

Modified: hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/TestGenAvro.java
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/TestGenAvro.java?rev=899885&r1=899884&r2=899885&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/TestGenAvro.java (original)
+++ hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/TestGenAvro.java Sat
Jan 16 05:11:07 2010
@@ -129,7 +129,7 @@
     public void run() throws Exception {
       String output = generate();
       String slurped = slurp(expectedOut);
-      assertEquals(slurped.trim(), output.trim());
+      assertEquals(slurped.trim(), output.replace("\r", "").trim());
     }
 
     public void write() throws Exception {

Modified: hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestDataFileTools.java
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestDataFileTools.java?rev=899885&r1=899884&r2=899885&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestDataFileTools.java
(original)
+++ hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestDataFileTools.java
Sat Jan 16 05:11:07 2010
@@ -75,7 +75,8 @@
         p, // stdout
         null, // stderr
         Arrays.asList(sampleFile.getPath()));
-    assertEquals(jsonData.toString(), baos.toString("UTF-8"));
+    assertEquals(jsonData.toString(), baos.toString("UTF-8").
+        replace("\r", ""));
   }
   
   @Test
@@ -87,7 +88,8 @@
         p, // stdout
         null, // stderr
         Arrays.asList(sampleFile.getPath()));
-    assertEquals(schema.toString() + "\n", baos.toString("UTF-8"));
+    assertEquals(schema.toString() + "\n",
+        baos.toString("UTF-8").replace("\r", ""));
   }
   
   @Test

Modified: hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestJsonToFromBinaryFragmentTools.java
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestJsonToFromBinaryFragmentTools.java?rev=899885&r1=899884&r2=899885&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestJsonToFromBinaryFragmentTools.java
(original)
+++ hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestJsonToFromBinaryFragmentTools.java
Sat Jan 16 05:11:07 2010
@@ -49,7 +49,7 @@
         p, // stdout
         null, // stderr
         Arrays.asList(STRING_SCHEMA.toString(), "-"));
-    assertEquals(JSON + "\n", baos.toString(UTF8));
+    assertEquals(JSON + "\n", baos.toString(UTF8).replace("\r", ""));
   }
   
   @Test

Modified: hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestRpcReceiveAndSendTools.java
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestRpcReceiveAndSendTools.java?rev=899885&r1=899884&r2=899885&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestRpcReceiveAndSendTools.java
(original)
+++ hadoop/avro/trunk/lang/java/src/test/java/org/apache/avro/tool/TestRpcReceiveAndSendTools.java
Sat Jan 16 05:11:07 2010
@@ -52,7 +52,8 @@
             Integer.toString(port), "{ \"a\": \"alpha\" }"));
     receive.run2(System.err);
     
-    assertEquals("sink\t{\"a\":\"alpha\"}\n", baos1.toString("UTF-8"));
-    assertEquals("\"omega\"\n", baos2.toString("UTF-8"));
+    assertEquals("sink\t{\"a\":\"alpha\"}\n",
+        baos1.toString("UTF-8").replace("\r", ""));
+    assertEquals("\"omega\"\n", baos2.toString("UTF-8").replace("\r", ""));
   }
 }



Mime
View raw message