diff --git a/Libraries/RCTTest/RCTTestRunner.h b/Libraries/RCTTest/RCTTestRunner.h index e2def90b2aa931..c59f73d73caf83 100644 --- a/Libraries/RCTTest/RCTTestRunner.h +++ b/Libraries/RCTTest/RCTTestRunner.h @@ -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]]; \ diff --git a/Libraries/RCTTest/RCTTestRunner.m b/Libraries/RCTTest/RCTTestRunner.m index e2fe4d8bca265c..dd381c0dabbc1b 100644 --- a/Libraries/RCTTest/RCTTestRunner.m +++ b/Libraries/RCTTest/RCTTestRunner.m @@ -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]];