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

Side by Side Diff: chrome/browser/sync/engine/syncer_thread_unittest.cc

Issue 2873039: Mark PauseWhenNotConnected as flaky as it keeps timing out,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 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 | chrome/browser/sync/engine/syncer_unittest.cc » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <list> 5 #include <list>
6 #include <map> 6 #include <map>
7 #include <set> 7 #include <set>
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 // Nudge the syncer to complete a cycle. 833 // Nudge the syncer to complete a cycle.
834 EXPECT_CALL(listener, HandleChannelEvent( 834 EXPECT_CALL(listener, HandleChannelEvent(
835 Field(&SyncerEvent::what_happened, SyncerEvent::SYNC_CYCLE_ENDED))). 835 Field(&SyncerEvent::what_happened, SyncerEvent::SYNC_CYCLE_ENDED))).
836 WillOnce(SignalEvent(&sync_cycle_ended_event)); 836 WillOnce(SignalEvent(&sync_cycle_ended_event));
837 syncer_thread()->NudgeSyncer(0, SyncerThread::kUnknown); 837 syncer_thread()->NudgeSyncer(0, SyncerThread::kUnknown);
838 sync_cycle_ended_event.Wait(); 838 sync_cycle_ended_event.Wait();
839 839
840 EXPECT_TRUE(syncer_thread()->Stop(2000)); 840 EXPECT_TRUE(syncer_thread()->Stop(2000));
841 } 841 }
842 842
843 TEST_F(SyncerThreadWithSyncerTest, PauseWhenNotConnected) { 843 // See bug 39070.
844 TEST_F(SyncerThreadWithSyncerTest, FLAKY_PauseWhenNotConnected) {
844 WaitableEvent sync_cycle_ended_event(false, false); 845 WaitableEvent sync_cycle_ended_event(false, false);
845 WaitableEvent event(false, false); 846 WaitableEvent event(false, false);
846 ListenerMock listener; 847 ListenerMock listener;
847 scoped_ptr<ChannelHookup<SyncerEvent> > hookup; 848 scoped_ptr<ChannelHookup<SyncerEvent> > hookup;
848 hookup.reset(syncer_thread()->relay_channel()->AddObserver(&listener)); 849 hookup.reset(syncer_thread()->relay_channel()->AddObserver(&listener));
849 PreventThreadFromPolling(); 850 PreventThreadFromPolling();
850 851
851 EXPECT_CALL(listener, HandleChannelEvent( 852 EXPECT_CALL(listener, HandleChannelEvent(
852 Field(&SyncerEvent::what_happened, SyncerEvent::STATUS_CHANGED))). 853 Field(&SyncerEvent::what_happened, SyncerEvent::STATUS_CHANGED))).
853 Times(AnyNumber()); 854 Times(AnyNumber());
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 EXPECT_CALL(listener, HandleChannelEvent( 936 EXPECT_CALL(listener, HandleChannelEvent(
936 Field(&SyncerEvent::what_happened, SyncerEvent::SYNC_CYCLE_ENDED))). 937 Field(&SyncerEvent::what_happened, SyncerEvent::SYNC_CYCLE_ENDED))).
937 WillOnce(SignalEvent(&sync_cycle_ended_event)); 938 WillOnce(SignalEvent(&sync_cycle_ended_event));
938 ASSERT_TRUE(Resume(&listener)); 939 ASSERT_TRUE(Resume(&listener));
939 sync_cycle_ended_event.Wait(); 940 sync_cycle_ended_event.Wait();
940 941
941 EXPECT_TRUE(syncer_thread()->Stop(2000)); 942 EXPECT_TRUE(syncer_thread()->Stop(2000));
942 } 943 }
943 944
944 } // namespace browser_sync 945 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698