Author: sebb Date: Thu Jun 7 20:52:54 2012 New Revision: 1347787 URL: http://svn.apache.org/viewvc?rev=1347787&view=rev Log: Trailing spaces and tab removal
Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java?rev=1347787&r1=1347786&r2=1347787&view=diff ============================================================================== --- commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java (original) +++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java Thu Jun 7 20:52:54 2012 @@ -38,7 +38,7 @@ import org.apache.commons.io.testtools.F public class TailerTest extends FileBasedTestCase { private Tailer tailer; - + public TailerTest(String name) { super(name); } @@ -51,7 +51,7 @@ public class TailerTest extends FileBase } FileUtils.deleteDirectory(getTestDirectory()); } - + public void testTailerEof() throws Exception { // Create & start the Tailer long delay = 50; @@ -65,8 +65,8 @@ public class TailerTest extends FileBase // Write some lines to the file FileWriter writer = null; try { - writeString(file, "Line"); - + writeString(file, "Line"); + Thread.sleep(delay * 2); List<String> lines = listener.getLines(); assertEquals("1 line count", 0, lines.size()); @@ -189,7 +189,7 @@ public class TailerTest extends FileBase IOUtils.closeQuietly(writer); } } - + /** Append a string to a file */ private void writeString(File file, String string) throws Exception { FileWriter writer = null; @@ -245,37 +245,37 @@ public class TailerTest extends FileBase private final List<String> lines = new ArrayList<String>(); volatile Exception exception = null; - + volatile int notFound = 0; volatile int rotated = 0; - + volatile int initialised = 0; public void handle(String line) { lines.add(line); } - + public List<String> getLines() { return lines; } - + public void clear() { lines.clear(); } - + public void handle(Exception e) { exception = e; } - + public void init(Tailer tailer) { initialised++; // not atomic, but OK because only updated here. } - + public void fileNotFound() { notFound++; // not atomic, but OK because only updated here. } - + public void fileRotated() { rotated++; // not atomic, but OK because only updated here. }