From 344ac48fa7050f151795fbfd2f138a563ca3ad40 Mon Sep 17 00:00:00 2001 From: Felix Bruckmeier Date: Tue, 2 Aug 2022 12:34:16 +0200 Subject: [PATCH] util-app: Attempt to fix flaky test in GitHub CI --- util-app/src/test/scala/com/twitter/app/AppTest.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util-app/src/test/scala/com/twitter/app/AppTest.scala b/util-app/src/test/scala/com/twitter/app/AppTest.scala index 5c70b2f126..2c20f1e89e 100644 --- a/util-app/src/test/scala/com/twitter/app/AppTest.scala +++ b/util-app/src/test/scala/com/twitter/app/AppTest.scala @@ -54,7 +54,7 @@ class WeNeverCloseButWeDoNotCare extends WeNeverClose { } trait ErrorOnExitApp extends App { - override val defaultCloseGracePeriod: Duration = 10.seconds + override val defaultCloseGracePeriod: Duration = 30.seconds override def exitOnError(throwable: Throwable): Unit = { throw throwable @@ -397,6 +397,10 @@ class AppTest extends AnyFunSuite { } test("App: exit functions properly capture mix of non-fatal and fatal exceptions") { + // This test case is known to be flaky on GitHub CI because it throws a `TimeoutException` before the expected + // `InterruptedException` is thrown. + // I suspect this is due to CI has limited CPU resources compared to local development while running lots of test + // suites in parallel. val app = new ErrorOnExitApp { def main(): Unit = { onExit {