Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rare concurrency bug in test code
In the test "RPS Adapts in Response to Throttling", the assert part of the unit test becomes unblocked after `doneStopping()` unblocks, which happens after the second `StopQueryWithContext` calls IS ABOUT TO return. Usually the test was working correctly where the stopper code for the second `StopQueryWithContext` call would fully execute. However, very occasionally, the assertions start running before all the stopper code runs, resulting in `stopAdapter.AssertExpectations(t)` failing at line 2215. This commit fixes that.
- Loading branch information