Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Side by Side Diff: sync/engine/sync_scheduler_unittest.cc

Issue 10079003: Mark SyncSchedulerTest.TransientPollFailure as flaky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 optimal_job_time = optimal_job_time + poll; 989 optimal_job_time = optimal_job_time + poll;
990 SCOPED_TRACE(testing::Message() << "SyncShare # (" << i << ")"); 990 SCOPED_TRACE(testing::Message() << "SyncShare # (" << i << ")");
991 EXPECT_GE(r.times[i], optimal_job_time); 991 EXPECT_GE(r.times[i], optimal_job_time);
992 EXPECT_EQ(GetUpdatesCallerInfo::PERIODIC, 992 EXPECT_EQ(GetUpdatesCallerInfo::PERIODIC,
993 r.snapshots[i]->source.updates_source); 993 r.snapshots[i]->source.updates_source);
994 } 994 }
995 } 995 }
996 996
997 // Test that poll failures are ignored. They should have no effect on 997 // Test that poll failures are ignored. They should have no effect on
998 // subsequent poll attempts, nor should they trigger a backoff/retry. 998 // subsequent poll attempts, nor should they trigger a backoff/retry.
999 TEST_F(SyncSchedulerTest, TransientPollFailure) { 999 // This test is flaky under memory tools, see http://crbug.com/118370.
1000 TEST_F(SyncSchedulerTest, FLAKY_TransientPollFailure) {
1000 SyncShareRecords r; 1001 SyncShareRecords r;
1001 const TimeDelta poll_interval(TimeDelta::FromMilliseconds(10)); 1002 const TimeDelta poll_interval(TimeDelta::FromMilliseconds(10));
1002 scheduler()->OnReceivedLongPollIntervalUpdate(poll_interval); 1003 scheduler()->OnReceivedLongPollIntervalUpdate(poll_interval);
1003 UseMockDelayProvider(); // Will cause test failure if backoff is initiated. 1004 UseMockDelayProvider(); // Will cause test failure if backoff is initiated.
1004 1005
1005 EXPECT_CALL(*syncer(), SyncShare(_,_,_)) 1006 EXPECT_CALL(*syncer(), SyncShare(_,_,_))
1006 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateCommitFailed), 1007 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateCommitFailed),
1007 RecordSyncShare(&r))) 1008 RecordSyncShare(&r)))
1008 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateSuccess), 1009 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateSuccess),
1009 RecordSyncShare(&r))); 1010 RecordSyncShare(&r)));
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 PumpLoop(); 1159 PumpLoop();
1159 // Pump again to run job. 1160 // Pump again to run job.
1160 PumpLoop(); 1161 PumpLoop();
1161 1162
1162 StopSyncScheduler(); 1163 StopSyncScheduler();
1163 1164
1164 EXPECT_TRUE(expected == context()->previous_session_routing_info()); 1165 EXPECT_TRUE(expected == context()->previous_session_routing_info());
1165 } 1166 }
1166 1167
1167 } // namespace browser_sync 1168 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698