spek v2.0.14 Release Notes
Release Date: 2020-11-14 // over 4 years ago-
๐ In
2.0.13
discovery and execution started using coroutines, which means they are not confined to a single thread anymore. This can be problematic as most test frameworks like mokk (and possibly mockito) rely on test execution to be confined in a single thread (#923). Another side effect is that the test execution order wasn't deterministic anymore as at any given point a coroutine can be suspended and control is given elsewhere. This release fixes both that issue, Spek is still using coroutines but the runtime ensures that a given test class will always be confined to a single thread.
Previous changes from v2.0.13
-
๐ This release adds several system properties to control how Spek does discovery and execution.
0๏ธโฃ
spek2.discovery.parallel.enabled
- controls whether discovery is done in parallel or not, by default it is disabled. The presence of this property regardless of value will enable parallel discovery.0๏ธโฃ
spek2.execution.parallel.enabled
- controls whether execution is done in parallel or not, by default it is disabled. The presence of this property regardless of value will enable parallel execution.๐
spek2.execution.test.timeout
-SPEK2_TIMEOUT
is now deprecated (will be removed in 2.1.0) and will be replaced by this property. Controls how long a test can run before timing out, by default it is disabled - i.e tests won't timeout.A note for parallel execution
โ Parallelism is at a class level not individual test scopes. Spek uses coroutines under the hood to execute tests in parallel, essentially
spek2.execution.parallel.enabled
just controls whichCoroutineDispatcher
is used. For parallel executionsDispatchers.Default
is used, otherwise the one provided byrunBlocking
is used.