question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong error thrown when test exceeds invocation time out

See original GitHub issue

Which 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:closed
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sksamuelcommented, Dec 22, 2020

I think this is good since 4.3.1. I will close this but please reopen if there is something outstanding.

1reaction
sksamuelcommented, Oct 27, 2020

It doesn’t look like you’re using invocations in your tests.

On Tue, 27 Oct 2020, 03:43 KeremAslan, notifications@github.com wrote:

Which 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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest/issues/1807, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGWDGCWH5PLUOT5E2JDSM2BZJANCNFSM4TAPYJSQ .

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found