Skip to content

Is there a way to set a global default timeout? #2195

Discussion options

You must be logged in to vote

Figured it out, but just by spelunking the code, doesn't seem to be documented anywhere.

In src/test/resources/SpockConfig.groovy:

timeout {
    int timeoutSeconds = System.getenv('CI') ? 60 : 30
    globalTimeout(Duration.ofSeconds(timeoutSeconds))
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Vampire
Comment options

Vampire Aug 20, 2025
Collaborator

Answer selected by efenderbosch-atg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants