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

Unified Diff: chrome/browser/sync/engine/syncer_thread2_unittest.cc

Issue 6267015: sync: fix a couple less-than comparisons to be less-than-eq in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/sync
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncer_thread2_unittest.cc
diff --git a/chrome/browser/sync/engine/syncer_thread2_unittest.cc b/chrome/browser/sync/engine/syncer_thread2_unittest.cc
index b0adecd42b1c9589f849d8a7ca5796c0cea80348..afacb99211b8c799ccf41bbfbcb4bfc5eee2c484 100644
--- a/chrome/browser/sync/engine/syncer_thread2_unittest.cc
+++ b/chrome/browser/sync/engine/syncer_thread2_unittest.cc
@@ -88,7 +88,7 @@ class SyncerThread2Test : public testing::Test {
SCOPED_TRACE(testing::Message() << "SyncShare # (" << i << ")");
TimeTicks optimal_next_sync = optimal_start + poll_interval * i;
EXPECT_GE(data[i], optimal_next_sync);
- EXPECT_LT(data[i], optimal_next_sync + poll_interval);
+ EXPECT_LE(data[i], optimal_next_sync + poll_interval);
EXPECT_EQ(GetUpdatesCallerInfo::PERIODIC,
records.snapshots[i]->source.first);
}
@@ -502,6 +502,7 @@ TEST_F(SyncerThread2Test, BackoffRelief) {
TimeTicks optimal_start = TimeTicks::Now() + poll + backoff;
syncer_thread()->Start(SyncerThread::NORMAL_MODE);
done.TimedWait(timeout());
+ syncer_thread()->Stop();
// Check for healthy polling after backoff is relieved.
// Can't use AnalyzePollRun because first sync is a continuation. Bleh.
@@ -509,7 +510,7 @@ TEST_F(SyncerThread2Test, BackoffRelief) {
SCOPED_TRACE(testing::Message() << "SyncShare # (" << i << ")");
TimeTicks optimal_next_sync = optimal_start + poll * i;
EXPECT_GE(r.times[i], optimal_next_sync);
- EXPECT_LT(r.times[i], optimal_next_sync + poll);
+ EXPECT_LE(r.times[i], optimal_next_sync + poll);
EXPECT_EQ(i == 0 ? GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION
: GetUpdatesCallerInfo::PERIODIC,
r.snapshots[i]->source.first);
« 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