Fix SeekBarWireframeMapper flaky test#2308
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2308 +/- ##
===========================================
- Coverage 70.32% 70.28% -0.05%
===========================================
Files 736 736
Lines 27466 27466
Branches 4607 4607
===========================================
- Hits 19315 19302 -13
+ Misses 6871 6868 -3
- Partials 1280 1296 +16 |
|
Thanks for the explanation @ambushwork, but I still feel I'm not getting it, especially this part:
Can you give a concrete example where it leads to the test failure? |
|
@0xnm yes, so if the test runs under previous code,
In the function which returns so we can see there is already a difference between |
|
@ambushwork I have the feeling that even with this change test may be flaky, just the probability will be much lower, but let's see. |
2825f0b to
2a03b54
Compare
yes, that's correct, with original code the chance of failure is kind like 1 in 2000, with the fix I think it can be reduced about 100 times, which I think it's acceptable. |
What does this PR do?
The main cause is that
fakeProgresshas random value such as0.00001, which loses some precision when convert to Int and convert back to float, sofakeProgressIntfrom 0~100 limit only two decimal .Review checklist (to be filled by reviewers)