Index: webrtc/p2p/base/port_unittest.cc |
diff --git a/webrtc/p2p/base/port_unittest.cc b/webrtc/p2p/base/port_unittest.cc |
index 4bff58adc7e176728800ca2a4fcffcc1c784d99b..2b2e4c6551992bca185d4abe12f4ba12662057b5 100644 |
--- a/webrtc/p2p/base/port_unittest.cc |
+++ b/webrtc/p2p/base/port_unittest.cc |
@@ -1255,16 +1255,16 @@ TEST_F(PortTest, TestConnectionDead) { |
ASSERT_EQ_WAIT(1, ch1.complete_count(), kTimeout); |
ASSERT_EQ_WAIT(1, ch2.complete_count(), kTimeout); |
- uint32_t before_created = rtc::Time(); |
ch1.CreateConnection(GetCandidate(port2)); |
uint32_t after_created = rtc::Time(); |
Connection* conn = ch1.conn(); |
ASSERT(conn != nullptr); |
// If the connection has never received anything, it will be dead after |
- // MIN_CONNECTION_LIFETIME |
- conn->UpdateState(before_created + MIN_CONNECTION_LIFETIME - 1); |
- rtc::Thread::Current()->ProcessMessages(100); |
+ // MIN_CONNECTION_LIFETIME AND inactive (write_timeout). |
pthatcher1
2015/12/30 17:12:28
This is now testing the case that when we are afte
honghaiz3
2015/12/30 19:38:18
Done.
|
+ conn->UpdateState(after_created + MIN_CONNECTION_LIFETIME + 1); |
+ rtc::Thread::Current()->ProcessMessages(0); |
EXPECT_TRUE(ch1.conn() != nullptr); |
+ conn->Prune(); |
conn->UpdateState(after_created + MIN_CONNECTION_LIFETIME + 1); |
EXPECT_TRUE_WAIT(ch1.conn() == nullptr, kTimeout); |