summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 18:54:22 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 18:54:22 +0000
commit943f84665969c17adfdbaac2631b5d99958e6fd2 (patch)
treed5ce332c4a75f02ae8bf7a793a49249e4c9dc1bb /sync
parente050411289bdac03ea2c45b8448ee6e812e6bae1 (diff)
downloadchromium_src-943f84665969c17adfdbaac2631b5d99958e6fd2.zip
chromium_src-943f84665969c17adfdbaac2631b5d99958e6fd2.tar.gz
chromium_src-943f84665969c17adfdbaac2631b5d99958e6fd2.tar.bz2
Remove flaky assertion from TransientPollFailure
This test has been causing flakiness on various platforms. Although we could try to fix this by relaxing the timing constraints, I think it's safer to remove the time-related assertions. The test will still be very useful even without that assertion. The UseMockDelayProvider() line and the other assertions should catch most of the same bugs that the timing assertions would have found. At least it's a significant improvement over a DISABLED/FLAKY test. BUG=118370 TEST=SyncSchedulerTest.TransientPollFailure Review URL: https://chromiumcodereview.appspot.com/10200001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r--sync/engine/sync_scheduler_unittest.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc
index 4488eb2..e8bbd65 100644
--- a/sync/engine/sync_scheduler_unittest.cc
+++ b/sync/engine/sync_scheduler_unittest.cc
@@ -997,10 +997,9 @@ TEST_F(SyncSchedulerTest, BackoffRelief) {
// Test that poll failures are ignored. They should have no effect on
// subsequent poll attempts, nor should they trigger a backoff/retry.
-// This test is flaky under memory tools, see http://crbug.com/118370.
-TEST_F(SyncSchedulerTest, FLAKY_TransientPollFailure) {
+TEST_F(SyncSchedulerTest, TransientPollFailure) {
SyncShareRecords r;
- const TimeDelta poll_interval(TimeDelta::FromMilliseconds(10));
+ const TimeDelta poll_interval(TimeDelta::FromMilliseconds(1));
scheduler()->OnReceivedLongPollIntervalUpdate(poll_interval);
UseMockDelayProvider(); // Will cause test failure if backoff is initiated.
@@ -1020,10 +1019,6 @@ TEST_F(SyncSchedulerTest, FLAKY_TransientPollFailure) {
// Run the successful poll.
RunLoop();
EXPECT_FALSE(scheduler()->IsBackingOff());
-
- // Verify the the two SyncShare() calls were made one poll interval apart.
- ASSERT_EQ(2U, r.snapshots.size());
- EXPECT_GE(r.times[1] - r.times[0], poll_interval);
}
TEST_F(SyncSchedulerTest, GetRecommendedDelay) {