Tests have huge delay, and "Default test timeout: 600000ms" shows
See original GitHub issueI’m trying Kotest for the first time (version 4.0.2). I created a new project in Android Studio 3.6.2, using Gradle 5.6.4. I added the basic example tests:
class MyTests : StringSpec({
"length should return size of string" {
"hello".length shouldBe 5
}
"startsWith should test for a prefix" {
"world" should startWith("wor")
}
})
I ran the tests, and they passed, but they took several seconds to run. The following was printed in the Android Studio ‘Run’ window:
~~~ Kotest Configuration ~~~
-> Parallelism: 1 thread(s)
-> Default test timeout: 600000ms
-> Default test order: TestCaseOrder
-> Default isolation mode: IsolationMode
-> Global soft assertations: False
-> Write spec failure file: False
-> Fail on ignored tests: False
-> Spec execution order: LexicographicSpecExecutionOrder
-> Extensions
- io.kotest.core.extensions.SystemPropertyTagExtension
- io.kotest.core.extensions.RuntimeTagExtension
- io.kotest.core.extensions.IgnoredSpecDiscoveryExtension
- io.kotest.core.extensions.TagFilteredDiscoveryExtension
There is no exception message; just the above. I get the same output if I run gradlew test
from the command line.
I tried both the JUnit 5 runner and the JUnit 4 runner, with the same results each time. I also tried Gradle 6.3, with the same results.
The following SO question seems to be the same issue:
Issue Analytics
- State:
- Created 3 years ago
- Comments:55 (28 by maintainers)
Top Results From Across the Web
For async tests and hooks, ensure "done()" is called
I know an ugly way of doing it, just by increasing default timeout of Mocha from 2 seconds to 10 seconds this can...
Read more >Async Methods - Testing Library
Several utilities are provided for dealing with asynchronous code. ... disappear in response to an event, user action, timeout, or Promise.
Read more >TcpDiscoverySpi (Ignite 2.14.0) - Apache Ignite
Default delay between attempts to connect to the cluster in milliseconds (value is ... Default SO_LINGER to set for socket, 0 means enabled...
Read more >Waiting for Objects in Image-Based Tests - SmartBear Support
When testing an application, you may need to delay the test run until the needed object ... Image-Based Testing: Configuring the Auto-wait timeout...
Read more >Setting up a collection-based monitor
By uploading a data file, you can run your tests with multiple sets of ... By default, each monitor run has a timeout...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I experience similar issue, although with non-Android, plain Kotlin/JVM project. From running the test task to executing first test it takes around 12 seconds, where it takes 6 seconds before it starts executing spec and then another 6 seconds before running the first test in the spec. The last number is surely affected by starting a Postgres container using TestContainers. I experience the problem with Kotest 4.0.2 and it is still there after upgrading to Kotest 4.1.1.
OS: Windows 10 x64 JVM: 14 Gradle: 6.3 Kotlin: 1.3.71 Kotest: 4.1.1
Here is a recording from test run:
You can also see I set
KOTEST_DEBUG
env var, but I don’t see any additional output. I tried the same in IntelliJ also without result. Any ideas how can I gather more details on the problem?Ok so filtering out some packages didn’t help.
I’m going to make a special build that contains more logging to try and get to the bottom of this.
On Wed, 15 Apr 2020 at 17:34, tom-jb notifications@github.com wrote: