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

Side by Side Diff: webrtc/base/signalthread_unittest.cc

Issue 2029523002: Disabled two flaky subtests of SignalThreadTest. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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
« 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 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 Thread::Current()->socketserver()->Wait(500, false); 152 Thread::Current()->socketserver()->Wait(500, false);
153 } 153 }
154 154
155 #define EXPECT_STATE(started, done, completed, stopped, deleted) \ 155 #define EXPECT_STATE(started, done, completed, stopped, deleted) \
156 EXPECT_EQ(started, thread_started_); \ 156 EXPECT_EQ(started, thread_started_); \
157 EXPECT_EQ(done, thread_done_); \ 157 EXPECT_EQ(done, thread_done_); \
158 EXPECT_EQ(completed, thread_completed_); \ 158 EXPECT_EQ(completed, thread_completed_); \
159 EXPECT_EQ(stopped, thread_stopped_); \ 159 EXPECT_EQ(stopped, thread_stopped_); \
160 EXPECT_EQ(deleted, thread_deleted_); 160 EXPECT_EQ(deleted, thread_deleted_);
161 161
162 TEST_F(SignalThreadTest, ThreadFinishes) { 162 #if defined(WEBRTC_LINUX)
163 #define MAYBE_ThreadFinishes DISABLED_ThreadFinishes
164 #else
165 #define MAYBE_ThreadFinishes ThreadFinishes
166 #endif
167 TEST_F(SignalThreadTest, MAYBE_ThreadFinishes) {
163 thread_->Start(); 168 thread_->Start();
164 EXPECT_STATE(1, 0, 0, 0, 0); 169 EXPECT_STATE(1, 0, 0, 0, 0);
165 Thread::SleepMs(500); 170 Thread::SleepMs(500);
166 EXPECT_STATE(1, 0, 0, 0, 0); 171 EXPECT_STATE(1, 0, 0, 0, 0);
167 Thread::Current()->ProcessMessages(0); 172 Thread::Current()->ProcessMessages(0);
168 EXPECT_STATE(1, 1, 1, 0, 1); 173 EXPECT_STATE(1, 1, 1, 0, 1);
169 } 174 }
170 175
171 TEST_F(SignalThreadTest, ReleasedThreadFinishes) { 176 #if defined(WEBRTC_LINUX)
177 #define MAYBE_ReleasedThreadFinishes DISABLED_ReleasedThreadFinishes
178 #else
179 #define MAYBE_ReleasedThreadFinishes ReleasedThreadFinishes
180 #endif
181 TEST_F(SignalThreadTest, MAYBE_ReleasedThreadFinishes) {
172 thread_->Start(); 182 thread_->Start();
173 EXPECT_STATE(1, 0, 0, 0, 0); 183 EXPECT_STATE(1, 0, 0, 0, 0);
174 thread_->Release(); 184 thread_->Release();
175 called_release_ = true; 185 called_release_ = true;
176 EXPECT_STATE(1, 0, 0, 0, 0); 186 EXPECT_STATE(1, 0, 0, 0, 0);
177 Thread::SleepMs(500); 187 Thread::SleepMs(500);
178 EXPECT_STATE(1, 0, 0, 0, 0); 188 EXPECT_STATE(1, 0, 0, 0, 0);
179 Thread::Current()->ProcessMessages(0); 189 Thread::Current()->ProcessMessages(0);
180 EXPECT_STATE(1, 1, 1, 0, 1); 190 EXPECT_STATE(1, 1, 1, 0, 1);
181 } 191 }
(...skipping 10 matching lines...) Expand all
192 TEST_F(SignalThreadTest, DeferredDestroyedThreadCleansUp) { 202 TEST_F(SignalThreadTest, DeferredDestroyedThreadCleansUp) {
193 thread_->Start(); 203 thread_->Start();
194 EXPECT_STATE(1, 0, 0, 0, 0); 204 EXPECT_STATE(1, 0, 0, 0, 0);
195 thread_->Destroy(false); 205 thread_->Destroy(false);
196 EXPECT_STATE(1, 0, 0, 1, 0); 206 EXPECT_STATE(1, 0, 0, 1, 0);
197 Thread::SleepMs(500); 207 Thread::SleepMs(500);
198 EXPECT_STATE(1, 0, 0, 1, 0); 208 EXPECT_STATE(1, 0, 0, 1, 0);
199 Thread::Current()->ProcessMessages(0); 209 Thread::Current()->ProcessMessages(0);
200 EXPECT_STATE(1, 1, 0, 1, 1); 210 EXPECT_STATE(1, 1, 0, 1, 1);
201 } 211 }
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