failgood icon indicating copy to clipboard operation
failgood copied to clipboard

Make timeout configurable on root-context level

Open mervyn-mccreight opened this issue 3 years ago • 3 comments

In case of e.g. integration testing you might know that special root-contexts contain long running tests, but you do not want to change the global timeout duration, because this is just for a special case.

For this it might be good to make the timeout configurable using a Duration timeout parameter on root-context describe. I'd suggest something like if there is a timeout defined on root-context level this takes precedence over the environment variable configuration.

mervyn-mccreight avatar Aug 01 '22 13:08 mervyn-mccreight

what about a second env variable for the root context timeout? i don't want absolute timeout values in the test source, mostly because I think that timeouts are context dependent.

Also I realize that timeouts are not perfect right now but I want to see if we can improve the handling of hanging root context somehow, and maybe in the end don't need timeouts, so I'd rather handle timeouts a bit later.

christophsturm avatar Aug 17 '22 10:08 christophsturm

I agree, timeouts are very context dependent. Best would be we would not need them at all. Don't know how to handle hanging tests though. Hm 🤔

mervyn-mccreight avatar Aug 18 '22 14:08 mervyn-mccreight

Something like:

val longLastingContext = describe<MyApp>(timeout = Timeout.fromEnv("FAILGOOD_INTEGRATION_TEST_TIMEOUT")) {

schielek avatar Sep 12 '22 14:09 schielek