From 336d48df4852021f4b51a15220d8ab976a79a59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Tue, 29 Nov 2016 13:36:55 -0800 Subject: [PATCH] [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. --- platform/darwin/test/MGLOfflineStorageTests.m | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/darwin/test/MGLOfflineStorageTests.m b/platform/darwin/test/MGLOfflineStorageTests.m index cd13a9262..07540b564 100644 --- a/platform/darwin/test/MGLOfflineStorageTests.m +++ b/platform/darwin/test/MGLOfflineStorageTests.m @@ -19,6 +19,7 @@ }]; if ([MGLOfflineStorage sharedOfflineStorage].packs) { [expectation fulfill]; + [self waitForExpectationsWithTimeout:0 handler:nil]; } else { [self waitForExpectationsWithTimeout:2 handler:nil]; }