Skip to content

Commit

Permalink
#585 - Refactored TestCase to MatcherAssert
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Yakushin committed Feb 19, 2018
1 parent d3ba2fd commit 2bc525e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/test/java/org/cactoos/iterator/SyncIteratorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import junit.framework.TestCase;
import org.cactoos.list.ListOf;
import org.cactoos.list.StickyList;
import org.hamcrest.MatcherAssert;
Expand Down Expand Up @@ -246,15 +245,15 @@ public void launch() throws InterruptedException {
}
});
}
TestCase.assertTrue(
MatcherAssert.assertThat(
"Timeout initializing threads! Perform longer thread init.",
this.ready.await(
this.runnables.size() * 50,
TimeUnit.MILLISECONDS
)
);
this.init.countDown();
TestCase.assertTrue(
MatcherAssert.assertThat(
String.format(
"Timeout! More than %d seconds",
10
Expand All @@ -264,7 +263,7 @@ public void launch() throws InterruptedException {
} finally {
this.pool.shutdownNow();
}
TestCase.assertTrue(
MatcherAssert.assertThat(
String.format(
"%s failed with exception(s) %s",
"Error",
Expand Down

0 comments on commit 2bc525e

Please sign in to comment.