Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update e2e test log watcher to wait for expected logs #9620

Open
dianabarsan opened this issue Nov 6, 2024 · 0 comments
Open

Update e2e test log watcher to wait for expected logs #9620

dianabarsan opened this issue Nov 6, 2024 · 0 comments
Labels
Testing Affects how the code is tested Type: Technical issue Improve something that users won't notice

Comments

@dianabarsan
Copy link
Member

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.

@dianabarsan dianabarsan added Testing Affects how the code is tested Type: Technical issue Improve something that users won't notice labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Affects how the code is tested Type: Technical issue Improve something that users won't notice
Projects
None yet
Development

No branches or pull requests

1 participant