diff --git a/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/worker/BackgroundWorkerTest.kt b/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/worker/BackgroundWorkerTest.kt index 3214e54a51..1b54d17635 100644 --- a/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/worker/BackgroundWorkerTest.kt +++ b/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/worker/BackgroundWorkerTest.kt @@ -78,7 +78,7 @@ internal class BackgroundWorkerTest { @Test fun `shutdown and wait exceeds timeout`() { - val latch = CountDownLatch(1) + val latch = CountDownLatch(2) val worker = BackgroundWorker( ShutdownAndWaitExecutorService(postAwaitTerminationAction = { latch.countDown() @@ -91,6 +91,7 @@ internal class BackgroundWorkerTest { ran = true } worker.shutdownAndWait(0) + assertEquals(1, latch.count) assertFalse(ran) }