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 tests #3364

Merged
merged 7 commits into from
Mar 25, 2024
Merged

fix flaky tests #3364

merged 7 commits into from
Mar 25, 2024

Conversation

robberphex
Copy link
Collaborator

@robberphex robberphex commented Mar 23, 2024

Describe what this PR does / why we need it

Fix flaky tests.

Does this pull request fix one issue?

Describe how you did it

  • ConcurrentClusterFlowCheckerTest& CurrentConcurrencyManagerTest, adjust flowId to prevent conflicts, use lambda to reduce lines of code and indent.
  • ParamFlowPartialIntegrationTest, mock TimeUtil to avoid unittest failure caused by timestamp changing.
  • ParamFlowThrottleRateLimitingCheckerTest, remove sout to reduce unittest log size.

Describe how to verify it

Special notes for reviews

image

mock TimeUtil to avoid time changed, and bucket moved to next.
remove sysprop csp.sentinel.log.output.type in TimeUtilTest,
to avoid a few outputs.
remove sout in ParamFlowThrottleRateLimitingCheckerTest,
to avoid a few outputs.
Copy link

codecov bot commented Mar 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.96%. Comparing base (ffe0d1e) to head (415ac35).
Report is 1 commits behind head on 1.8.

Additional details and impacted files
@@             Coverage Diff              @@
##                1.8    #3364      +/-   ##
============================================
+ Coverage     45.89%   45.96%   +0.07%     
- Complexity     2142     2147       +5     
============================================
  Files           430      430              
  Lines         12900    12899       -1     
  Branches       1730     1730              
============================================
+ Hits           5920     5929       +9     
+ Misses         6284     6271      -13     
- Partials        696      699       +3     
Components Coverage Δ
sentinel-adapter 43.22% <ø> (ø)
sentinel-cluster 23.71% <ø> (+0.42%) ⬆️
sentinel-core 59.78% <100.00%> (+0.03%) ⬆️
sentinel-extension 46.22% <ø> (-0.18%) ⬇️
sentinel-logging 54.54% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@LearningGp LearningGp left a comment

Choose a reason for hiding this comment

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

LGTM

@LearningGp LearningGp merged commit befdc56 into alibaba:1.8 Mar 25, 2024
10 checks passed
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