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

Unified Diff: webrtc/base/testclient.cc

Issue 1982733002: Re-enabling socket tests that were previously flaky. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing ifdefs. Using same logic as network.cc. Created 4 years, 7 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 | « webrtc/base/socket_unittest.cc ('k') | webrtc/base/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/testclient.cc
diff --git a/webrtc/base/testclient.cc b/webrtc/base/testclient.cc
index c7484fa54148e7aad249f75ddd3d070b26ecd0d4..be4de82ad6006b445434e47d9c46fdef74105a43 100644
--- a/webrtc/base/testclient.cc
+++ b/webrtc/base/testclient.cc
@@ -34,9 +34,10 @@ TestClient::~TestClient() {
bool TestClient::CheckConnState(AsyncPacketSocket::State state) {
// Wait for our timeout value until the socket reaches the desired state.
- uint32_t end = TimeAfter(kTimeoutMs);
- while (socket_->GetState() != state && TimeUntil(end) > 0)
+ int64_t end = TimeAfter(kTimeoutMs);
+ while (socket_->GetState() != state && TimeUntil(end) > 0) {
Thread::Current()->ProcessMessages(1);
+ }
return (socket_->GetState() == state);
}
@@ -63,7 +64,7 @@ TestClient::Packet* TestClient::NextPacket(int timeout_ms) {
// Pumping another thread's queue could lead to messages being dispatched from
// the wrong thread to non-thread-safe objects.
- uint32_t end = TimeAfter(timeout_ms);
+ int64_t end = TimeAfter(timeout_ms);
while (TimeUntil(end) > 0) {
{
CritScope cs(&crit_);
« no previous file with comments | « webrtc/base/socket_unittest.cc ('k') | webrtc/base/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698