rpc/stream: fix flaky test
start/idle timeout related tests are flaky in a overloaded machine
(especially in race tests), since it can take longer than the wait
time to show the expected behavior.
This CL changes to wait for the expected notifications forever to remove
this kind of time dependency. But we still need to wait some amount of
time to verify that there is no notification in some test cases. In this
case, I keep the original wait time so that a test can wait long enough
to discover any failure in normal circumstances.
Also added a mutex in faketimer to remove a data race failure.
Change-Id: Iffe36a136776ed63dfb15693bef93752676852f1
6 files changed