Permalink
Browse files

RNTester: Relax Bridge Release Check

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 e3c6f38773d0b578794726033d4fabbfa48d1c7b
Showing with 1 addition and 2 deletions.
  1. +1 −2 Libraries/RCTTest/RCTTestRunner.m
@@ -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.