Fix flaky test_json_serialization by using deterministic test data#582
Fix flaky test_json_serialization by using deterministic test data#582
Conversation
5866cbd to
f1c3c8e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #582 +/- ##
=======================================
Coverage 82.60% 82.60%
=======================================
Files 9 9
Lines 2604 2604
=======================================
Hits 2151 2151
Misses 453 453 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #582 will not alter performanceComparing
|
Co-authored-by: hombit <1784493+hombit@users.noreply.github.com>
Co-authored-by: hombit <1784493+hombit@users.noreply.github.com>
b9fe806 to
74c9ab8
Compare
…ignore Co-authored-by: hombit <1784493+hombit@users.noreply.github.com>
The
test_json_serializationtest intermittently fails in CI with relative differences ~1.13e-07, exceeding the defaultassert_allclosetolerance of 1e-07. This occurs due to non-deterministic random data generation in the test.Changes
rng=0togen_lc()call to ensure deterministic test data generationThis approach makes the test fully deterministic by ensuring the same random data is generated every run, eliminating flakiness at the source while maintaining the strict default tolerance (rtol=1e-7). This is consistent with the test parametrization which already uses
rng=0for feature generation.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.