Skip to content
Commit 968cc7f3 authored by Yunfan Chen's avatar Yunfan Chen
Browse files

Fix flaky TaskStackChangedListenerTest

The test was flaky is because the activity can be killed before the test
finished running.

The test activity would be killed in onPostResumed and the latch count
down is happening in onResumed. After that, the test was trying to
access task ID via the activity. It is possible that when accessing
task ID, the activity is no longer there.

To fix that, keep the task ID when creating the activity in the test.
This will significantly reduce, if not eliminate, the flakiness inside.

Mark as pre-submit candidate to be monitored.

Test: atest TaskStackChangedListenerTest
Bug: 119893767
Change-Id: I3826282b395169097cb3496e47557d622a8fc856
parent 2f040bef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment