HBASE-6828. [WINDOWS] TestMemoryBoundedLogMessageBuffer failures

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1407298 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Enis Soztutar 2012-11-08 22:22:10 +00:00
parent b28150763d
commit 8d079e7ca5
1 changed files with 7 additions and 5 deletions

View File

@ -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,10 +54,11 @@ 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