[ios, macos] Fixed spurious offline storage test failure

Even if the expectation is immediately fulfilled, we still have to wait for it to be fulfilled, because the expectation only gets unregistered after waiting. The zombie expectation was fulfilling a stricter expectation in a test method.
This commit is contained in:
Minh Nguyễn
2016-11-29 13:36:55 -08:00
committed by Minh Nguyễn
parent d830c48e4a
commit 336d48df48

View File

@@ -19,6 +19,7 @@
}];
if ([MGLOfflineStorage sharedOfflineStorage].packs) {
[expectation fulfill];
[self waitForExpectationsWithTimeout:0 handler:nil];
} else {
[self waitForExpectationsWithTimeout:2 handler:nil];
}