Skip to content

Commit

Permalink
RNTester: Relax Bridge Release Check
Browse files Browse the repository at this point in the history
Reviewed By: mmmulani

Differential Revision: D6665596

fbshipit-source-id: 2c59ea8add039d2bfc6b76701d16e82088fa8aad
  • Loading branch information
yungsters authored and facebook-github-bot committed Jan 5, 2018
1 parent 45e6fcd commit e3c6f38
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Libraries/RCTTest/RCTTestRunner.m
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,12 @@ - (void)runTest:(SEL)test module:(NSString *)moduleName
[bridge invalidate];
}

// Wait for bridge to disappear before continuing to the next test
// Give the bridge a chance to disappear before continuing to the next test.
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]];
}
RCTAssert(batchedBridge == nil, @"Bridge should be deallocated after the test");
}

@end

0 comments on commit e3c6f38

Please sign in to comment.