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.

timeout should be of type Duration? instead of Long?

See original GitHub issue

Which version of Kotest are you using version : 5.5.3

class TimeOutTest : StringSpec({
    timeout = 100.milliseconds //error: type Mismatch Type mismatch. Required:Long? Found:Duration
    "test case".config(timeout = 400.milliseconds) {
        println("hello world!")
    }
})

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
AnouarDoukkalicommented, Oct 30, 2022

sorry the 1.22.0-RC2 version was for Detekt plugin. I’m using 5.5.3 version for Kotest

0reactions
sksamuelcommented, Nov 2, 2022

We can’t change it now without breaking everyone’s tests. It’s just a historical artifact that kotest came out before durations existed.

On Wed, Nov 2, 2022, 11:49 AM Anouar Doukkali @.***> wrote:

@Kantis https://github.com/Kantis timeout and invocationTimeout in project level config ,spec config , and test config are all related since each one override the one on top of it . I think it is best if they had all the most obvious type in kotest 6.0 to avoid problems for example for the same duration :

timeout:Duration? = 100.nanoseconds timeout:Long?= // I wouldn’t know what to put here

— Reply to this email directly, view it on GitHub https://github.com/kotest/kotest/issues/3273#issuecomment-1300028781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGT7ZRAALPQVAT7JMX3WGJBMVANCNFSM6AAAAAARSONSG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

The method implicitlyWait(long, TimeUnit) from the type ...
It means the method implicitlyWait(long, TimeUnit) is no more supported and you should use an updated method to serve the same purpose. You...
Read more >
Interface WebDriver.Timeouts
Specifies the amount of time the driver should wait when searching for an element if it is not immediately present. Deprecated.
Read more >
Add method $.shouldBe(condition, timeout) #1136 - GitHub
Solution. It would be better readable if method name was should / shouldBe / shouldHave instead of waitUntil (but with ...
Read more >
The 4 Types of Activity timeouts - Temporal
Practically, if an Activity Execution can take anywhere from 5 minutes to 5 hours, you need to set Start-To-Close to be longer than...
Read more >
Configuring timeouts for capturing user input - Amazon Lex
Defines how long Amazon Lex V2 waits before speech input is truncated and the speech is returned to your application. You can increase...
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