Skip to content

Commit

Permalink
test: alter assertion of flaky test (#1409)
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalwrench authored Sep 20, 2024
1 parent c0c0a30 commit b1ae924
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -91,6 +91,7 @@ internal class BackgroundWorkerTest {
ran = true
}
worker.shutdownAndWait(0)
assertEquals(1, latch.count)
assertFalse(ran)
}

Expand Down

0 comments on commit b1ae924

Please sign in to comment.