-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Description
Use case:
I disconnect container A (after both containers A and B were started) to see whether container B responds with expected error log, and I make assertion for it.
Current workaround
I use sleep to wait a fixed amount of time after which I expect the error log to be printed, and then the assertion gets run
Flaws with the workaround
- If I run more integration tests simultaneously or run the integration tests on slower platform (lower-spec computer, CI), the amount of time sleeped might be insufficient for the error log to appear, which would fail the assertion. I'd have to revisit old integration tests and increase the sleep time
- if I run the integration test on faster platform (high-end computer), or run it in isolation (instead of all integration tests simultaneously) the integration tests will take longer time than necessary to complete
- Even if I can eventually find the right amount of time to sleep, it still takes a lot of tinkering and many runs to figure out what's the right amount of time to sleep.
Solution
Would be nice to have a method like .with_wait_for() but after the container has started. Implemented on ContainerAsync<I: Image>.
Metadata
Metadata
Assignees
Labels
No labels