facebookincubator / fizz

C++14 implementation of the TLS-1.3 standard
Other
1.13k stars 158 forks source link

fix flaky SlidingBloomReplayCacheTest.cpp #96

Closed ahornby closed 6 months ago

ahornby commented 1 year ago

fix flaky SlidingBloomReplayCacheTest.cpp

SlidingBloomReplayCacheTest.cpp test was flaky, looks like the expiry can happen at exactly 1 second, moving to 1001 milliseconds fixed it.

Updated associated comments to remove the time periods as was duplicative of the chrono call just below the comments

Test Plan:

Run locally

 ./build/fbcode_builder/getdeps.py build --src-dir=. fizz
 ./build/fbcode_builder/getdeps.py test --src-dir=. fizz

before, fails with:

[==========] 5 tests from 1 test suite ran. (1115 ms total)
[  PASSED  ] 4 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] SlidingBloomReplayCacheTest.TestTimeBucketing

 1 FAILED TEST

after, passes with:

100% tests passed, 0 tests failed out of 68

Total Test time (real) =   1.07 sec

Stack created with Sapling. Best reviewed with ReviewStack.

ahornby commented 1 year ago

Can you fix the "// 1.5 seconds in, " comment as well

@AjanthanAsogamoorthy done, no need for the comment to repeat the chrono calls