Update e2e test log watcher to wait for expected logs #9620
Labels
Testing
Affects how the code is tested
Type: Technical issue
Improve something that users won't notice
Describe the issue
We have a procedure in e2e test where we collect service logs while performing certain requests or operations. and analyze the resulting logs to validate whether or not actions have been successful / correct.
Unfortunately, there is a delay between the actions happening and the logs being pushed to the watcher - docker needs to write the log to a file and then we tail the file and get the result.
This leaves us with flaky tests. The solution applied right now is to wait for a moderate amount of time (usually less than a second) before collecting logs, to insure that we are giving docker (or k3d) a chance to finish writing logs to wherever.
Describe the improvement you'd like
Instead of relying on these waits, change the log collector function to resolve only when all expected lines are logged.
The text was updated successfully, but these errors were encountered: