You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by kr...@apache.org on 2015/12/22 12:27:36 UTC

svn commit: r1721360 - /commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java

Author: krosenvold
Date: Tue Dec 22 11:27:36 2015
New Revision: 1721360

URL: http://svn.apache.org/viewvc?rev=1721360&view=rev
Log:
Remved potential race condition between stop and interrupt in testcase

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=1721360&r1=1721359&r2=1721360&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 Tue Dec 22 11:27:36 2015
@@ -250,8 +250,6 @@ public class TailerTest extends FileBase
         listener.clear();
 
         // Stop
-        tailer.stop();
-        tailer=null;
         thread.interrupt();
         TestUtils.sleep(testDelayMillis * 4);
         write(file, "Line five");
@@ -261,6 +259,9 @@ public class TailerTest extends FileBase
         assertEquals("Expected init to be called", 1 , listener.initialised);
         assertEquals("fileNotFound should not be called", 0 , listener.notFound);
         assertEquals("fileRotated should be be called", 1 , listener.rotated);
+        tailer.stop();
+        tailer=null;
+
     }
 
     @Test