From 8d079e7ca5da4812eab236180b55764e2e8383df Mon Sep 17 00:00:00 2001 From: Enis Soztutar Date: Thu, 8 Nov 2012 22:22:10 +0000 Subject: [PATCH] HBASE-6828. [WINDOWS] TestMemoryBoundedLogMessageBuffer failures git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1407298 13f79535-47bb-0310-9956-ffa450edef68 --- .../TestMemoryBoundedLogMessageBuffer.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java index 125c9769928..a43511edb1b 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java @@ -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 TestMemoryBoundedLogMessageBuffer { 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));