You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test has a data race because it re-programs a mock in
a non memory coherent (and wishful thinking) way, and the
goroutine that sends the messages isn't effected by
the mock synchronization attempts in the test, because
they happen after the data race occurs.
This change set fixes the data race by programming the stream's
mock only once, and having it dynamically read the returned values
while holding a lock, which synchronizes between the goroutine
that sends down the stream and the test goroutine.
Ran this 10,000 times with data race detector and it doesn't
fail now.
Change-Id: I8a0030586da9102e8539c9f7b8699c63c6565894
Signed-off-by: yacovm <yacovm@il.ibm.com>
0 commit comments