Skip to content

Commit 344ac48

Browse files
committed
util-app: Attempt to fix flaky test in GitHub CI
1 parent 1904b60 commit 344ac48

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

util-app/src/test/scala/com/twitter/app/AppTest.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class WeNeverCloseButWeDoNotCare extends WeNeverClose {
5454
}
5555

5656
trait ErrorOnExitApp extends App {
57-
override val defaultCloseGracePeriod: Duration = 10.seconds
57+
override val defaultCloseGracePeriod: Duration = 30.seconds
5858

5959
override def exitOnError(throwable: Throwable): Unit = {
6060
throw throwable
@@ -397,6 +397,10 @@ class AppTest extends AnyFunSuite {
397397
}
398398

399399
test("App: exit functions properly capture mix of non-fatal and fatal exceptions") {
400+
// This test case is known to be flaky on GitHub CI because it throws a `TimeoutException` before the expected
401+
// `InterruptedException` is thrown.
402+
// I suspect this is due to CI has limited CPU resources compared to local development while running lots of test
403+
// suites in parallel.
400404
val app = new ErrorOnExitApp {
401405
def main(): Unit = {
402406
onExit {

0 commit comments

Comments
 (0)