Commit 564200f4 authored by Eric Seckler's avatar Eric Seckler Committed by Commit Bot

tracing: Fix further flakiness in TracingPreferencesTest

The temp tracing file is deleted in an AsyncTask, so poll for it to
complete instead of directly asserting the file deletion.

TBR=twellington@chromium.org

Bug: 907913
Change-Id: I5c31ed9b0154756ce711bcaea0b166173a0a196f
Reviewed-on: https://chromium-review.googlesource.com/c/1349256Reviewed-by: default avatarEric Seckler <eseckler@chromium.org>
Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610572}
parent 9ff75e5f
......@@ -238,8 +238,8 @@ public class TracingPreferencesTest {
deleteIntent.send();
callbackHelper.waitForCallback(3 /* currentCallCount */);
// The temporary file should be deleted.
Assert.assertFalse(tempFile.exists());
// The temporary file should be deleted asynchronously.
CriteriaHelper.pollInstrumentationThread(Criteria.equals(false, () -> tempFile.exists()));
// Notification should be deleted, too.
waitForNotificationManagerMutation();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment