diff options
Diffstat (limited to 'src/test')
-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); |