Skip to content

Commit

Permalink
Set connect timeout to 5s to avoid health check to hang when connecting
Browse files Browse the repository at this point in the history
  • Loading branch information
tillrohrmann committed Nov 15, 2024
1 parent 3ab906c commit 49a3b64
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/dev/restate/sdktesting/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class RestateSdkTestSuite : CliktCommand() {
// The default keep alive time is way too long, and this is a problem when we stop and restart
// containers.
System.setProperty("jdk.httpclient.keepalive.timeout", "5")
// The health check strategy uses the HttpUrlConnection which has no connect timeout by default.
// Could have caused the health check to hang indefinitely.
System.setProperty("sun.net.client.defaultConnectTimeout", "5000")
}
}

Expand Down

0 comments on commit 49a3b64

Please sign in to comment.