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

Unified Diff: talk/app/webrtc/objctests/RTCPeerConnectionTest.mm

Issue 1361213002: Adding 20-second timeout to Java and Objective-C tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removing redundant stack trace for timeout. Created 5 years, 3 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 | « talk/app/webrtc/objctests/RTCPeerConnectionSyncObserver.m ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/objctests/RTCPeerConnectionTest.mm
diff --git a/talk/app/webrtc/objctests/RTCPeerConnectionTest.mm b/talk/app/webrtc/objctests/RTCPeerConnectionTest.mm
index 050c9f4c95dd61acdacd6b23718e618373a4a88d..73ff30981b74996ab39c2c36e3653123b621354a 100644
--- a/talk/app/webrtc/objctests/RTCPeerConnectionTest.mm
+++ b/talk/app/webrtc/objctests/RTCPeerConnectionTest.mm
@@ -46,6 +46,8 @@
#error "This file requires ARC support."
#endif
+const NSTimeInterval kRTCPeerConnectionTestTimeout = 20;
+
@interface RTCFakeRenderer : NSObject <RTCVideoRenderer>
@end
@@ -235,8 +237,12 @@
[pcOffer addICECandidate:candidate];
}
- [offeringExpectations waitForAllExpectationsToBeSatisfied];
- [answeringExpectations waitForAllExpectationsToBeSatisfied];
+ EXPECT_TRUE(
+ [offeringExpectations waitForAllExpectationsToBeSatisfiedWithTimeout:
+ kRTCPeerConnectionTestTimeout]);
+ EXPECT_TRUE(
+ [answeringExpectations waitForAllExpectationsToBeSatisfiedWithTimeout:
+ kRTCPeerConnectionTestTimeout]);
EXPECT_EQ(pcOffer.signalingState, RTCSignalingStable);
EXPECT_EQ(pcAnswer.signalingState, RTCSignalingStable);
@@ -248,7 +254,9 @@
[[RTCDataBuffer alloc] initWithData:textData isBinary:NO];
[answeringExpectations expectMessage:[textData copy] isBinary:NO];
EXPECT_TRUE([offeringExpectations.dataChannel sendData:buffer]);
- [answeringExpectations waitForAllExpectationsToBeSatisfied];
+ EXPECT_TRUE(
+ [answeringExpectations waitForAllExpectationsToBeSatisfiedWithTimeout:
+ kRTCPeerConnectionTestTimeout]);
// Test send and receive binary data
const size_t byteLength = 5;
@@ -257,7 +265,9 @@
buffer = [[RTCDataBuffer alloc] initWithData:byteData isBinary:YES];
[answeringExpectations expectMessage:[byteData copy] isBinary:YES];
EXPECT_TRUE([offeringExpectations.dataChannel sendData:buffer]);
- [answeringExpectations waitForAllExpectationsToBeSatisfied];
+ EXPECT_TRUE(
+ [answeringExpectations waitForAllExpectationsToBeSatisfiedWithTimeout:
+ kRTCPeerConnectionTestTimeout]);
[offeringExpectations expectStateChange:kRTCDataChannelStateClosing];
[answeringExpectations expectStateChange:kRTCDataChannelStateClosing];
@@ -267,8 +277,12 @@
[answeringExpectations.dataChannel close];
[offeringExpectations.dataChannel close];
- [offeringExpectations waitForAllExpectationsToBeSatisfied];
- [answeringExpectations waitForAllExpectationsToBeSatisfied];
+ EXPECT_TRUE(
+ [offeringExpectations waitForAllExpectationsToBeSatisfiedWithTimeout:
+ kRTCPeerConnectionTestTimeout]);
+ EXPECT_TRUE(
+ [answeringExpectations waitForAllExpectationsToBeSatisfiedWithTimeout:
+ kRTCPeerConnectionTestTimeout]);
// Don't need to listen to further state changes.
// TODO(tkchin): figure out why Closed->Closing without this.
offeringExpectations.dataChannel.delegate = nil;
@@ -288,8 +302,12 @@
[pcOffer close];
[pcAnswer close];
- [offeringExpectations waitForAllExpectationsToBeSatisfied];
- [answeringExpectations waitForAllExpectationsToBeSatisfied];
+ EXPECT_TRUE(
+ [offeringExpectations waitForAllExpectationsToBeSatisfiedWithTimeout:
+ kRTCPeerConnectionTestTimeout]);
+ EXPECT_TRUE(
+ [answeringExpectations waitForAllExpectationsToBeSatisfiedWithTimeout:
+ kRTCPeerConnectionTestTimeout]);
capturer = nil;
videoSource = nil;
« no previous file with comments | « talk/app/webrtc/objctests/RTCPeerConnectionSyncObserver.m ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698