Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion util-app/src/test/scala/com/twitter/app/AppTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down