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 flaky log rotation test #1544

Merged
merged 2 commits into from
Dec 12, 2023
Merged

fix flaky log rotation test #1544

merged 2 commits into from
Dec 12, 2023

Conversation

ashmeenkaur
Copy link
Collaborator

@ashmeenkaur ashmeenkaur commented Dec 11, 2023

Description

There is an edge case that rarely happens in log rotation integration tests where we try to stat a log file when the logs are getting rotated (the old log file getting renamed and new log file being created) as the operation is not atomic. This was causing failure in the integration tests. In order to fix the issue, we will retry the stat call once again before failing the test. If two consecutive stat calls fail, we will fail the test.

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - NA
  2. Unit tests - NA
  3. Integration tests - Ran as part of presubmit.

@ashmeenkaur ashmeenkaur added the execute-integration-tests Run only integration tests label Dec 11, 2023
@ashmeenkaur ashmeenkaur marked this pull request as ready for review December 11, 2023 08:49
@ashmeenkaur ashmeenkaur removed the execute-integration-tests Run only integration tests label Dec 11, 2023
@ashmeenkaur ashmeenkaur merged commit bbf65d7 into master Dec 12, 2023
8 checks passed
@ashmeenkaur ashmeenkaur deleted the fix-flaky-log-rotation-test branch December 12, 2023 09:19
gargnitingoogle pushed a commit that referenced this pull request Jan 4, 2024
* fix flaky log rotation test

* fix lint
ashmeenkaur added a commit that referenced this pull request Jan 9, 2024
* fix flaky log rotation test

* fix lint
ashmeenkaur added a commit that referenced this pull request Jan 10, 2024
* fix flaky log rotation test

* fix lint
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