commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1721360 - /commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java
Date Tue, 22 Dec 2015 11:27:36 GMT
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



Mime
View raw message