Skip to content

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

Merged
mtardy merged 1 commit into
mainfrom
pr/mtardy/fix-exit-code
May 24, 2023
Merged

tests: rewrite pkg/sensors/exec:TestExitCode#1015
mtardy merged 1 commit into
mainfrom
pr/mtardy/fix-exit-code

Conversation

@mtardy

@mtardy mtardy commented May 22, 2023

Copy link
Copy Markdown
Member

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 kkourt, olsajiri and willfindlay and removed request for olsajiri May 22, 2023 10:41

@willfindlay willfindlay left a comment

Copy link
Copy Markdown
Contributor

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
@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

2 participants