mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Run Konsist tests sequentially
It's sadly faster that way: Every time we run a test class in parallel a new JVM is started, and the `KoScope` contents can't be shared between them. This scope can take a few minutes to load, so having several instances of this happening at the same time is a terrible idea. It's actually faster to run the tests sequentially, at least locally.
This commit is contained in:
@@ -29,6 +29,11 @@ dependencies {
|
||||
// - Add every single module as a dependency of this one.
|
||||
// - Move the Konsist tests to the `app` module, but the `app` module does not need to know about Konsist.
|
||||
tasks.withType<Test>().configureEach {
|
||||
// Disable parallel tests: every time we run a test class in parallel a new JVM is started, and the `KoScope` contents can't be shared between them.
|
||||
// This scope can take 1-2min to load, so having several instances of this happening is a terrible idea.
|
||||
// It's actually faster to run the tests sequentially, at least locally.
|
||||
maxParallelForks = 1
|
||||
|
||||
val isNotCheckTask = gradle.startParameter.taskNames.any { it.contains("check", ignoreCase = true).not() }
|
||||
outputs.upToDateWhen { isNotCheckTask }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user