Spek: Adjust default timeout globally

Created on 19 Aug 2019  路  6Comments  路  Source: spekframework/spek

As an enhancement to #692 I think Spek should offer a possibility to override/specify the default timeout globally for all tests. At the moment the timeout can only be specified per test suite or test.

I encounter random TimeoutCancellationException in various tests when my machine seems to be under heavy load. Increasing the timeout of a test usually fixes this. However I don't want to override the timeout in each of my hundreds of tests.

improvement

Most helpful comment

Scheduling this for the next release.

All 6 comments

Nice idea! For JVM the configuration can be passed via https://junit.org/junit5/docs/current/user-guide/#running-tests-build-gradle-config-params.

This 10 second timeout surprised me when I needed to use the debugger to walk through a test case. Being able to alter/disable this behavior would make stepping through code much nicer.

Scheduling this for the next release.

Thanks for the quick update @raniejade.
Could you please share with us how one can configure this global timeout?

Thanks for implementing this so quickly! Any plans when the next release is ready? :)

@schalkms it can be set via the property SPEK_TIMEOUT. You can try it out with the latest dev builds but it has pretty big changes internally that might have issues (like #781 and #789)

@svenjacobs No hard deadlines yet but hopefully in two weeks time. Two main things I'd like to finish first before releasing are:

  • Publish to maven central (sorting out domain ownership and reserving namespace in OSSH)
  • Allow disabling timeouts (#792)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

pilgr picture pilgr  路  3Comments

robstoll picture robstoll  路  7Comments

raosuj picture raosuj  路  3Comments

snowe2010 picture snowe2010  路  5Comments

ruigoncalo picture ruigoncalo  路  7Comments