OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 int second_channel_; | 84 int second_channel_; |
85 LoopBackTransport* transport_; | 85 LoopBackTransport* transport_; |
86 }; | 86 }; |
87 | 87 |
88 TEST_F(RtpRtcpTest, RemoteRtcpCnameHasPropagatedToRemoteSide) { | 88 TEST_F(RtpRtcpTest, RemoteRtcpCnameHasPropagatedToRemoteSide) { |
89 if (!FLAGS_include_timing_dependent_tests) { | 89 if (!FLAGS_include_timing_dependent_tests) { |
90 TEST_LOG("Skipping test - running in slow execution environment...\n"); | 90 TEST_LOG("Skipping test - running in slow execution environment...\n"); |
91 return; | 91 return; |
92 } | 92 } |
93 | 93 |
94 // We need to sleep a bit here for the name to propagate. For | 94 // We need to sleep a bit here for the name to propagate. For instance, |
95 // instance, 200 milliseconds is not enough, 1 second still flaky, | 95 // 200 milliseconds is not enough, so we'll go with one second here. |
96 // so we'll go with five seconds here. | 96 Sleep(1000); |
97 Sleep(5000); | |
98 | 97 |
99 char char_buffer[256]; | 98 char char_buffer[256]; |
100 voe_rtp_rtcp_->GetRemoteRTCP_CNAME(channel_, char_buffer); | 99 voe_rtp_rtcp_->GetRemoteRTCP_CNAME(channel_, char_buffer); |
101 EXPECT_STREQ(RTCP_CNAME, char_buffer); | 100 EXPECT_STREQ(RTCP_CNAME, char_buffer); |
102 } | 101 } |
103 | 102 |
104 TEST_F(RtpRtcpTest, SSRCPropagatesCorrectly) { | 103 TEST_F(RtpRtcpTest, SSRCPropagatesCorrectly) { |
105 unsigned int local_ssrc = 1234; | 104 unsigned int local_ssrc = 1234; |
106 EXPECT_EQ(0, voe_base_->StopSend(channel_)); | 105 EXPECT_EQ(0, voe_base_->StopSend(channel_)); |
107 EXPECT_EQ(0, voe_rtp_rtcp_->SetLocalSSRC(channel_, local_ssrc)); | 106 EXPECT_EQ(0, voe_rtp_rtcp_->SetLocalSSRC(channel_, local_ssrc)); |
108 EXPECT_EQ(0, voe_base_->StartSend(channel_)); | 107 EXPECT_EQ(0, voe_base_->StartSend(channel_)); |
109 | 108 |
110 Sleep(1000); | 109 Sleep(1000); |
111 | 110 |
112 unsigned int ssrc; | 111 unsigned int ssrc; |
113 EXPECT_EQ(0, voe_rtp_rtcp_->GetLocalSSRC(channel_, ssrc)); | 112 EXPECT_EQ(0, voe_rtp_rtcp_->GetLocalSSRC(channel_, ssrc)); |
114 EXPECT_EQ(local_ssrc, ssrc); | 113 EXPECT_EQ(local_ssrc, ssrc); |
115 | 114 |
116 EXPECT_EQ(0, voe_rtp_rtcp_->GetRemoteSSRC(channel_, ssrc)); | 115 EXPECT_EQ(0, voe_rtp_rtcp_->GetRemoteSSRC(channel_, ssrc)); |
117 EXPECT_EQ(local_ssrc, ssrc); | 116 EXPECT_EQ(local_ssrc, ssrc); |
118 } | 117 } |
OLD | NEW |