diff options
author | Jason Wray <jason@mapbox.com> | 2018-09-18 13:55:23 -0700 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2018-09-20 14:57:07 -0700 |
commit | 737ebed7d5997872e8c1419cc6bfbb10ae6242d2 (patch) | |
tree | fba922ee2860d08b24d732366db45773f8d37dce /platform/darwin/test/MGLOfflineStorageTests.mm | |
parent | 0a1b38e7f898ce46bed581e4cb4af36bcb2b3b02 (diff) | |
download | qtlocation-mapboxgl-737ebed7d5997872e8c1419cc6bfbb10ae6242d2.tar.gz |
[ios, tests] Bump most waitForExpectationsWithTimeout's to 5s
[skip firebase]
Bump MGLOfflineStorageTests timeouts to 5 seconds
Diffstat (limited to 'platform/darwin/test/MGLOfflineStorageTests.mm')
-rw-r--r-- | platform/darwin/test/MGLOfflineStorageTests.mm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/platform/darwin/test/MGLOfflineStorageTests.mm b/platform/darwin/test/MGLOfflineStorageTests.mm index 261e9a3a9c..ad6e1a0570 100644 --- a/platform/darwin/test/MGLOfflineStorageTests.mm +++ b/platform/darwin/test/MGLOfflineStorageTests.mm @@ -43,7 +43,7 @@ [expectation fulfill]; [self waitForExpectationsWithTimeout:0 handler:nil]; } else { - [self waitForExpectationsWithTimeout:2 handler:nil]; + [self waitForExpectationsWithTimeout:5 handler:nil]; } XCTAssertNotNil([MGLOfflineStorage sharedOfflineStorage].packs, @"Shared offline storage object should have a non-nil collection of packs by this point."); @@ -86,7 +86,7 @@ pack = completionHandlerPack; [additionCompletionHandlerExpectation fulfill]; }]; - [self waitForExpectationsWithTimeout:2 handler:nil]; + [self waitForExpectationsWithTimeout:5 handler:nil]; XCTAssertEqual([MGLOfflineStorage sharedOfflineStorage].packs.count, countOfPacks + 1, @"Added pack should have been added to the canonical collection of packs owned by the shared offline storage object. This assertion can fail if this test is run before -testAAALoadPacks."); @@ -124,7 +124,7 @@ return notificationPack == pack && pack.state == MGLOfflinePackStateInactive; }]; [pack requestProgress]; - [self waitForExpectationsWithTimeout:1 handler:nil]; + [self waitForExpectationsWithTimeout:5 handler:nil]; } - (void)testAddPackForGeometry { @@ -157,7 +157,7 @@ pack = completionHandlerPack; [additionCompletionHandlerExpectation fulfill]; }]; - [self waitForExpectationsWithTimeout:2 handler:nil]; + [self waitForExpectationsWithTimeout:5 handler:nil]; XCTAssertEqual([MGLOfflineStorage sharedOfflineStorage].packs.count, countOfPacks + 1, @"Added pack should have been added to the canonical collection of packs owned by the shared offline storage object. This assertion can fail if this test is run before -testAAALoadPacks."); @@ -195,7 +195,7 @@ return notificationPack == pack && pack.state == MGLOfflinePackStateInactive; }]; [pack requestProgress]; - [self waitForExpectationsWithTimeout:1 handler:nil]; + [self waitForExpectationsWithTimeout:5 handler:nil]; pack = nil; } @@ -239,7 +239,7 @@ XCTAssertEqual(pack.state, MGLOfflinePackStateInvalid, @"Removed pack should be invalid in the completion handler."); [completionHandlerExpectation fulfill]; }]; - [self waitForExpectationsWithTimeout:1 handler:nil]; + [self waitForExpectationsWithTimeout:5 handler:nil]; XCTAssertEqual(pack.state, MGLOfflinePackStateInvalid, @"Removed pack should have been invalidated synchronously."); @@ -314,9 +314,9 @@ NSNumber *fileSizeNumber = [fileAttributes objectForKey:NSFileSize]; long long fileSize = [fileSizeNumber longLongValue]; - long long dabaseFileSize = 32391168; + long long databaseFileSize = 32391168; // Merging databases creates an empty file if the file does not exist at the given path. - XCTAssertEqual(fileSize, dabaseFileSize, @"The dabase file size must be:%lld actual size:%lld", dabaseFileSize, fileSize); + XCTAssertEqual(fileSize, databaseFileSize, @"The database file size must be:%lld actual size:%lld", databaseFileSize, fileSize); NSUInteger countOfPacks = [MGLOfflineStorage sharedOfflineStorage].packs.count; @@ -337,7 +337,7 @@ } [fileAdditionCompletionHandlerExpectation fulfill]; }]; - [self waitForExpectationsWithTimeout:2 handler:nil]; + [self waitForExpectationsWithTimeout:5 handler:nil]; // Depending on the database it may update or add a pack. For this case specifically the offline database adds one pack. XCTAssertEqual([MGLOfflineStorage sharedOfflineStorage].packs.count, countOfPacks + 1, @"Adding contents of barcelona.db should add one pack."); } @@ -364,7 +364,7 @@ XCTAssertNil(packs, @"Passing an invalid offline database file should not add packs to the offline database."); [invalidFileCompletionHandlerExpectation fulfill]; }]; - [self waitForExpectationsWithTimeout:2 handler:nil]; + [self waitForExpectationsWithTimeout:5 handler:nil]; } // File non existent { |