Work around the timing resolution of Handler#postDelayed()
This is a follow up CL to my previous CL [1], which added unit tests for CompletableFutureUtil. It seems that the time resolution of Handler#postDelayed() is indeed milliseconds, and one may observe that the scheduled task can be triggered a bit earlier within the resolution. This CL introduces a utility method so that all the tests in CompletableFutureUtilTest that rely on Handler#postDelayed() can take that behavior into account. There should be no semantic changes in the test expectations. [1]: I215bbc870f952effa262fa431064b36ace28e8f4 ba8cdf5d Fix: 198735181 Test: atest -c FrameworksCoreTests:CompletableFutureUtilTest Change-Id: I70f6c80398d9f97d17764a2aebbc86d9669a0272
Loading
Please register or sign in to comment