Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remote: Fix flaky ByteStreamUploaderTest.
Running locally, I noticed that the multipleBlobsUploadShouldWork() test is flaky (~1% of all runs). The flakiness exists due to Future.get() being notified about completion before the future's listeners are executed. We make use of future listeners to remove an upload digest from an internal hashmap, after the upload completed. Thus, checking for this map to be empty immediately after uploadBlob (aka Future.get()) returned, could sometimes fail due to the listeners not having executed yet. The fix is to periodically poll the hashmap until all listeners have executed. RELNOTES: None. PiperOrigin-RevId: 161507486
- Loading branch information