Commit dbdc5ea0 authored by Francois Doray's avatar Francois Doray Committed by Commit Bot

Fix flakiness in TwoClientPrintersSyncTest.ConflictResolution with RunAllTasksUntilIdle().

This CL adds a call to RunAllTasksUntilIdle() between the 2 description changes
in TwoClientPrintersSyncTest.ConflictResolution. This mimics what was
done prior to https://chromium-review.googlesource.com/c/chromium/src/+/890000
and should eliminate flakiness.

Bug: 810408
Change-Id: I52b7bc3a0ac76b4b2ddb0881b60ff137ba93e2c8
Reviewed-on: https://chromium-review.googlesource.com/1165800Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582152}
parent 14a5f1f5
...@@ -125,6 +125,12 @@ IN_PROC_BROWSER_TEST_F(TwoClientPrintersSyncTest, ConflictResolution) { ...@@ -125,6 +125,12 @@ IN_PROC_BROWSER_TEST_F(TwoClientPrintersSyncTest, ConflictResolution) {
// Wait for a non-zero period (200ms). // Wait for a non-zero period (200ms).
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(200)); base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(200));
// Run all tasks so the first description change is applied.
// TODO(crbug.com/810408): This is a temporary fix to prevent flakiness. Tasks
// shouldn't run between description changes, because it prevents a real
// conflict from happening.
content::RunAllTasksUntilIdle();
ASSERT_TRUE( ASSERT_TRUE(
EditPrinterDescription(GetPrinterStore(0), 0, kLatestDescription)); EditPrinterDescription(GetPrinterStore(0), 0, kLatestDescription));
......
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