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

tests: rewrite pkg/sensors/exec:TestExitCode #1015

Merged
merged 1 commit into from May 24, 2023
Merged

Conversation

mtardy
Copy link
Member

@mtardy mtardy commented May 22, 2023

Might fix #1014.

The test was calling JsonTestCheck multiple times resulting in the deletion of the logs if one of the tests before the last one failed. Now test also uses the eventchecker framework and is simpler.

The test was also flaky, not sure this will fix the issue but I could reproduce the failure after a hundred runs with the previous code while I could not at the moment with this one after 200+ runs. At least we will have the failure logs if this test continues to fail in the future.

The test was calling JsonTestCheck multiple times resulting in the
deletion of the logs if one of the tests before the last one failed. Now
test also uses the eventchecker framework and is simpler.

The test was also flaky, not sure this will fix the issue but I could
reproduce the failure after a hundred runs with the previous code while
I could not at the moment with this one after 200+ runs. At least we
will have the failure logs if this test continues to fail in the future.

Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
@mtardy mtardy added the area/testing Related to testing label May 22, 2023
@mtardy mtardy requested a review from a team as a code owner May 22, 2023 10:41
@mtardy mtardy requested review from olsajiri, kkourt and willfindlay and removed request for olsajiri May 22, 2023 10:41
Copy link
Contributor

@willfindlay willfindlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mtardy mtardy merged commit 2422e0f into main May 24, 2023
18 checks passed
@mtardy mtardy deleted the pr/mtardy/fix-exit-code branch May 24, 2023 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test: TestExitCode is flaky
2 participants