diff options
author | 2015-11-30 17:02:08 +0000 | |
---|---|---|
committer | 2015-11-30 18:30:47 +0000 | |
commit | 18565b0a8fcd609a000a18e11c0099f5aebbbc50 (patch) | |
tree | f387e522ff8e7666f50b0a8500e3d826c17a196e /src/test/java/com/google/devtools/build/lib/concurrent | |
parent | 4359ca2fb2e2aa9910c4bb7510cbcbf2d725dd15 (diff) |
Migrated tests in devtools/build/lib/concurrent to JUnit 4.
--
MOS_MIGRATED_REVID=108983674
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/concurrent')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/concurrent/KeyedLockerTest.java | 4 | ||||
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/concurrent/MoreFuturesTest.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/concurrent/KeyedLockerTest.java b/src/test/java/com/google/devtools/build/lib/concurrent/KeyedLockerTest.java index 173e7121d9..f08396ccaf 100644 --- a/src/test/java/com/google/devtools/build/lib/concurrent/KeyedLockerTest.java +++ b/src/test/java/com/google/devtools/build/lib/concurrent/KeyedLockerTest.java @@ -49,14 +49,14 @@ public abstract class KeyedLockerTest { protected abstract KeyedLocker<String> makeFreshLocker(); @Before - public void setUp_KeyedLockerTest() { + public final void setUp_KeyedLockerTest() { locker = makeFreshLocker(); executorService = Executors.newFixedThreadPool(NUM_EXECUTOR_THREADS); wrapper = new ThrowableRecordingRunnableWrapper("KeyedLockerTest"); } @After - public void tearDown() { + public final void shutdownExecutor() throws Exception { locker = null; MoreExecutors.shutdownAndAwaitTermination(executorService, TestUtils.WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS); diff --git a/src/test/java/com/google/devtools/build/lib/concurrent/MoreFuturesTest.java b/src/test/java/com/google/devtools/build/lib/concurrent/MoreFuturesTest.java index d842480ca2..b8fbe352a7 100644 --- a/src/test/java/com/google/devtools/build/lib/concurrent/MoreFuturesTest.java +++ b/src/test/java/com/google/devtools/build/lib/concurrent/MoreFuturesTest.java @@ -47,12 +47,12 @@ public class MoreFuturesTest { private ExecutorService executorService; @Before - public void setUp() throws Exception { + public final void createExecutor() throws Exception { executorService = Executors.newFixedThreadPool(5); } @After - public void tearDown() throws Exception { + public final void shutdownExecutor() throws Exception { MoreExecutors.shutdownAndAwaitTermination(executorService, TestUtils.WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS); |