hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1407298 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java
Date Thu, 08 Nov 2012 22:22:11 GMT
Author: enis
Date: Thu Nov  8 22:22:10 2012
New Revision: 1407298

URL: http://svn.apache.org/viewvc?rev=1407298&view=rev
Log:
HBASE-6828. [WINDOWS] TestMemoryBoundedLogMessageBuffer failures

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java?rev=1407298&r1=1407297&r2=1407298&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java
Thu Nov  8 22:22:10 2012
@@ -18,7 +18,8 @@
  */
 package org.apache.hadoop.hbase.monitoring;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
@@ -53,17 +54,18 @@ public class TestMemoryBoundedLogMessage
     StringWriter sw = new StringWriter();
     buf.dumpTo(new PrintWriter(sw));
     String dump = sw.toString();
+    String eol = System.getProperty("line.separator");
     assertFalse("The early log messages should be evicted",
-        dump.contains("hello 1\n"));
+        dump.contains("hello 1" + eol));
     assertTrue("The late log messages should be retained",
-        dump.contains("hello 999\n"));
+        dump.contains("hello 999" + eol));
   }
-  
+
   @Test
   public void testNonAsciiEncoding() {
     MemoryBoundedLogMessageBuffer buf =
       new MemoryBoundedLogMessageBuffer(TEN_KB);
-    
+
     buf.add(JP_TEXT);
     StringWriter sw = new StringWriter();
     buf.dumpTo(new PrintWriter(sw));



Mime
View raw message