Attempt to reduce race of WmTests
WmTests contains both e2e and mocked unit tests. The mocked tests
are sensitive to concurrent issue. Such as if the activity is still
destroying on main thread, then when the next test starts to establish
mocked environment, it may throw ConcurrentModificationException
when iterating invocation records because there is additional access
from other thread.
This change waits until the test activities are destroyed, that avoids
overlapping with the next test.
Bug: 293549565
Bug: 254268165
Test: TaskStackChangedListenerTest
Change-Id: I1b2eb77585ba0a1ee936ee921af95e9c2113ec63
9 files changed