Skip to content
Snippets Groups Projects
Commit be32bd62 authored by felmer's avatar felmer
Browse files

testWithTimer() and testOnChangeCalled() merged. Hopefully it solves the...

testWithTimer() and testOnChangeCalled() merged. Hopefully it solves the random failure of testOnChangeCalled()

SVN: 1419
parent 34046b58
No related branches found
No related tags found
No related merge requests found
...@@ -104,19 +104,14 @@ public class FileWatcherTest ...@@ -104,19 +104,14 @@ public class FileWatcherTest
assertEquals(true, onChangeCalled); assertEquals(true, onChangeCalled);
} }
@Test @Test(timeOut = 5000, groups = "slow")
public final void testWithTimer() throws IOException public final void testOnChangeCalled() throws IOException
{ {
onChangeCalled = false; onChangeCalled = false;
FileWatcher fileWatcher = new TestFileWatcher(tmpFile2); FileWatcher fileWatcher = new TestFileWatcher(tmpFile2);
FileUtils.touch(tmpFile2); FileUtils.touch(tmpFile2);
Timer timer = new Timer(true); Timer timer = new Timer(true);
timer.schedule(fileWatcher, 0); timer.schedule(fileWatcher, 0);
}
@Test(dependsOnMethods = "testWithTimer", timeOut = 5000, groups = "slow")
public final void testOnChangeCalled()
{
while (onChangeCalled == false) while (onChangeCalled == false)
{ {
try try
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment