RNTester: Relax Bridge Release Check

Reviewed By: mmmulani

Differential Revision: D6665596

fbshipit-source-id: 2c59ea8add039d2bfc6b76701d16e82088fa8aad
This commit is contained in:
Tim Yung 2018-01-05 14:54:16 -08:00 committed by Facebook Github Bot
parent 45e6fcdba0
commit e3c6f38773

View File

@ -186,13 +186,12 @@ expectErrorBlock:(BOOL(^)(NSString *error))expectErrorBlock
[bridge invalidate]; [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]; NSDate *invalidateTimeout = [NSDate dateWithTimeIntervalSinceNow:30];
while (invalidateTimeout.timeIntervalSinceNow > 0 && batchedBridge != nil) { while (invalidateTimeout.timeIntervalSinceNow > 0 && batchedBridge != nil) {
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes 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 @end