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

fix(tests): fix TestHealthReporterRetry, TestValidateTokenStatic #2038

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

AminSlk
Copy link
Contributor

@AminSlk AminSlk commented Oct 14, 2024

Ref: SRX-AHGZTR
Ref: SRX-TI3JNJ

  • TestHealthReporterRetry: There's a background job going on in the ReportHealth function which should be completed before we check the expectations. Sometimes it may be left behind(It's pretty rare). So, if we wait for that and then do the checks, it would solve the problem.
  • TestValidateTokenStatic: It seems that we are testing not our code but the code of an underlying library golang-jwt. We shouldn't test the error messages that are returned by the library not us.

@AminSlk AminSlk requested a review from a team as a code owner October 14, 2024 10:29
Ref: SRX-AHGZTR
Ref: SRX-TI3JNJ

- TestHealthReporterRetry: There's a background job going on in the ReportHealth function which should be completed before we check the expectations. Sometimes it may be left behind(It's pretty rare). So, if we wait several miliseconds and then do the checks, it would solve the problem.
- TestValidateTokenStatic: The issue is related to the underlying library `golang-jwt` that we use. Since we shouldn't test the libraries it's ok to remove the test.
@AminSlk AminSlk force-pushed the am/fix-flaky-tests branch from 3be068a to c172979 Compare October 14, 2024 12:46
@AminSlk AminSlk merged commit 4f76ce2 into main Oct 15, 2024
17 checks passed
@AminSlk AminSlk deleted the am/fix-flaky-tests branch October 15, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants