Wrong error thrown when test exceeds invocation time out
See original GitHub issueWhich version of Kotest are you using 1.4.10
I have noticed that if a test exceeds its invocationTimeout
kotest throws a TimeoutException
.
In my case I am running 3 parametrized tests that have configured as follows:
"mytest".config(invocationTimeout = 45.minutes, timeout = 3.hours)
This is (part of) the error thrown after roughly 45 minutes:
Test did not complete within 10800000ms
TimeoutException(duration=10800000)
at io.kotest.core.internal.TestCaseExecutor.executeAndWait(TestCaseExecutor.kt:216)
at io.kotest.core.internal.TestCaseExecutor.invokeTestCase(TestCaseExecutor.kt:161)
at io.kotest.core.internal.TestCaseExecutor.executeActiveTest(TestCaseExecutor.kt:130)
at io.kotest.core.internal.TestCaseExecutor$intercept$2.invokeSuspend(TestCaseExecutor.kt:80)
at io.kotest.core.internal.TestCaseExecutor$intercept$2.invoke(TestCaseExecutor.kt)
at io.kotest.core.internal.TestCaseExecutor.executeIfActive(TestCaseExecutor.kt:94)
at io.kotest.core.internal.TestCaseExecutor.intercept(TestCaseExecutor.kt:80)
at io.kotest.core.internal.TestCaseExecutor.execute(TestCaseExecutor.kt:61)
at io.kotest.engine.runners.SingleInstanceSpecRunner.runTest(SingleInstanceSpecRunner.kt:73)
at io.kotest.engine.runners.SingleInstanceSpecRunner$Context.registerTestCase(SingleInstanceSpecRunner.kt:51)
at io.kotest.core.internal.TestCaseExecutor$executeAndWait$2$1$1$3$1$contextp$1.registerTestCase(TestCaseExecutor.kt:204)
at io.kotest.core.test.TestContext$DefaultImpls.registerTestCase(TestContext.kt:39)
at io.kotest.core.internal.TestCaseExecutor$executeAndWait$2$1$1$3$1$contextp$1.registerTestCase(TestCaseExecutor.kt:202)
at io.kotest.core.spec.style.scopes.TestWithConfigBuilder.config-i5u-HFk(TestWithConfigBuilder.kt:49)
at io.kotest.core.spec.style.scopes.FreeScope.config-FgC7SQg(FreeScope.kt:55)
at io.kotest.core.spec.style.scopes.FreeScope.config-FgC7SQg$default(FreeScope.kt:48)
Shouldn’t this be an InvocationTimeoutException
instead?
While on that note, may I suggest renaming invocationTimeout
and timeout
something more descriptive, e.g testCaseTimeout
and testSuiteTimeout
? Both timeout
and invocationTimeout
are very generic a term and it is easy to get confused which one is what.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Message "Async callback was not invoked within the 5000 ms ...
Sometimes, when I run the tests, everything works as expectedly. Other times, I get an error: Timeout - Async callback was not invoked...
Read more >Error Messages During Test Execution - LambdaTest
Here is a list of various error messages that may happen during test execution.
Read more >Execution Timeout Expired. The timeout period elapsed prior ...
Hi Team,. We are getting below error while running query in SSMS: Execution Timeout Expired. The timeout period elapsed prior to completion ...
Read more >Mocha - the fun, simple, flexible JavaScript test framework
If you use callback-based async tests, Mocha will throw an error if done() is called multiple times. This is handy for catching accidental...
Read more >How can I troubleshoot 5xx errors for API Gateway?
500 error: internal server error · The backend payload size exceeded 10 MB. The maximum backend payload size is 10 MB and can't...
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 FreeTop 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
Top GitHub Comments
I think this is good since 4.3.1. I will close this but please reopen if there is something outstanding.
It doesn’t look like you’re using invocations in your tests.
On Tue, 27 Oct 2020, 03:43 KeremAslan, notifications@github.com wrote: