Skip to content

Commit

Permalink
Gradle TestKit: reduce daemon timeouts (#3481)
Browse files Browse the repository at this point in the history
* reduce daemon timeouts to aid integration-test reliability on TeamCity
  • Loading branch information
adam-enko committed Feb 6, 2024
1 parent 1e8c21f commit 6be29d8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.jetbrains.dokka.it.AbstractIntegrationTest
import java.io.File
import java.net.URI
import kotlin.test.BeforeTest
import kotlin.time.Duration.Companion.seconds

abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() {

Expand Down Expand Up @@ -48,6 +49,11 @@ abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() {
else
null,

// Decrease Gradle daemon idle timeout to prevent old agents lingering on CI.
// A lower timeout means slower tests, which is preferred over OOMs and locked processes.
"-Dorg.gradle.daemon.idletimeout=" + 10.seconds.inWholeMilliseconds, // default is 3 hours!
"-Pkotlin.daemon.options.autoshutdownIdleSeconds=10",

* arguments
)
).run { this as DefaultGradleRunner }
Expand Down

0 comments on commit 6be29d8

Please sign in to comment.