Fix synchronization issue in tests.

Test: Manual
Bug: 306178462
Change-Id: I4937f8043088080db01a74208096623da5cbed8f
1 file changed