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

Unified Diff: webrtc/p2p/base/turnport_unittest.cc

Issue 2086203004: Allow receiving a packet on a TURN port from an unknown address. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing memory leak found by ASan bot. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/turnport.cc ('k') | webrtc/p2p/base/turnserver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/turnport_unittest.cc
diff --git a/webrtc/p2p/base/turnport_unittest.cc b/webrtc/p2p/base/turnport_unittest.cc
index 2fa5525718f5b8e647e6a5155074dec0363df4ed..077ca4d7f1f35ccd6382213f9fdb6b4bc2feb1ec 100644
--- a/webrtc/p2p/base/turnport_unittest.cc
+++ b/webrtc/p2p/base/turnport_unittest.cc
@@ -460,19 +460,17 @@ class TurnPortTest : public testing::Test,
EXPECT_TRUE_WAIT(turn_unknown_address_, kTimeout);
// Flush all requests in the invoker to destroy the TurnEntry.
- // Now the turn port cannot receive the ping.
+ // However, the TURN port should still signal the unknown address.
turn_unknown_address_ = false;
turn_port_->invoker()->Flush(rtc::Thread::Current());
conn1->Ping(0);
- rtc::Thread::Current()->ProcessMessages(500);
- EXPECT_FALSE(turn_unknown_address_);
+ EXPECT_TRUE_WAIT(turn_unknown_address_, kTimeout);
// If the connection is created again, it will start to receive pings.
conn2 = turn_port_->CreateConnection(udp_port_->Candidates()[0],
Port::ORIGIN_MESSAGE);
conn1->Ping(0);
EXPECT_TRUE_WAIT(conn2->receiving(), kTimeout);
- EXPECT_FALSE(turn_unknown_address_);
}
void TestTurnSendData() {
« no previous file with comments | « webrtc/p2p/base/turnport.cc ('k') | webrtc/p2p/base/turnserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698