chore: unleash integration test stability issues#374
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a polling mechanism to ensure feature flags are fully propagated to the Unleash client API before integration tests proceed, which helps prevent flakiness. A review comment suggests improving error handling in the polling loop by catching specific network exceptions instead of a broad exception.
| logger.info( | ||
| f"Waiting for flags; have {len(names)}/{len(EXPECTED_FLAGS)}" | ||
| ) | ||
| except Exception as e: |
There was a problem hiding this comment.
Catching a broad Exception can hide unexpected issues and make debugging harder. It's generally better to catch more specific exceptions. For network-related issues during polling, requests.exceptions.RequestException is more appropriate.
| except Exception as e: | |
| except requests.exceptions.RequestException as e: |
07b667d to
822429b
Compare
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
822429b to
b7e8762
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #374 +/- ##
==========================================
+ Coverage 90.16% 98.72% +8.56%
==========================================
Files 1 3 +2
Lines 122 157 +35
==========================================
+ Hits 110 155 +45
+ Misses 12 2 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This fails sometimes when CI is busy.