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

test: fix flaky test case test_volume_metrics #1810

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

chriscchien
Copy link
Contributor

@chriscchien chriscchien commented Mar 6, 2024

Which issue(s) this PR fixes:

Issue #7626

What this PR does / why we need it:

Improve the test case stability. The origin code have a chance to get value 0 by actual_size = float(volume.controllers[0].actualSize) because timing issue lead the test case fail. Update test code to write fixed data size and verify metric longhorn_volume_actual_size_bytes with the fixed data size.

100 times test result

Special notes for your reviewer:

N/A

Additional documentation or context

N/A

@chriscchien chriscchien self-assigned this Mar 6, 2024
@chriscchien chriscchien requested a review from a team as a code owner March 6, 2024 06:53
Copy link
Member

@yangchiu yangchiu left a comment

Choose a reason for hiding this comment

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

LGTM

@yangchiu yangchiu merged commit 40cb77d into longhorn:master Mar 6, 2024
5 checks passed
@chriscchien
Copy link
Contributor Author

@mergify backport v1.6.x v1.5.x

Copy link

mergify bot commented Mar 6, 2024

backport v1.6.x v1.5.x

✅ Backports have been created

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