Permalink
Browse files

Increase RCTTestRunner timeouts

Reviewed By: shergin

Differential Revision: D5706622

fbshipit-source-id: 2185e673913d366afca234d121eaf601ff7c5887
  • Loading branch information...
javache authored and facebook-github-bot committed Aug 25, 2017
1 parent b050b69 commit dacb1fbc11ea235b7ca7da4bbaaa3c5a5b9de9f3
Showing with 3 additions and 3 deletions.
  1. +1 −1 Libraries/RCTTest/RCTTestRunner.h
  2. +2 −2 Libraries/RCTTest/RCTTestRunner.m
@@ -17,7 +17,7 @@
#define RCT_RUN_RUNLOOP_WHILE(CONDITION) \
{ \
NSDate *timeout = [NSDate dateWithTimeIntervalSinceNow:5]; \
NSDate *timeout = [NSDate dateWithTimeIntervalSinceNow:30]; \
NSRunLoop *runloop = [NSRunLoop mainRunLoop]; \
while ((CONDITION)) { \
[runloop runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.01]]; \
@@ -152,7 +152,7 @@ - (void)runTest:(SEL)test module:(NSString *)moduleName
RCTAssert(nonLayoutSubviews.count == 0, @"There shouldn't be any other views: %@", nonLayoutSubviews);
#endif
if (expectErrorBlock) {
RCTAssert(expectErrorBlock(error), @"Expected an error but nothing matched.");
} else {
@@ -165,7 +165,7 @@ - (void)runTest:(SEL)test module:(NSString *)moduleName
}
// Wait for bridge to disappear before continuing to the next test
NSDate *invalidateTimeout = [NSDate dateWithTimeIntervalSinceNow:5];
NSDate *invalidateTimeout = [NSDate dateWithTimeIntervalSinceNow:30];
while (invalidateTimeout.timeIntervalSinceNow > 0 && batchedBridge != nil) {
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];

0 comments on commit dacb1fb

Please sign in to comment.