summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-06-01 15:49:28 -0700
committerChris Loer <chris.loer@mapbox.com>2018-06-04 11:32:20 -0700
commit6eee8729554ed778491c52bda46cdcbec61b9c95 (patch)
tree5fb11f29259733f05083b9e0e8e23637ceaaeeac
parent050337fb680c5ea4fcef99a6d15bfca6815677c9 (diff)
downloadqtlocation-mapboxgl-6eee8729554ed778491c52bda46cdcbec61b9c95.tar.gz
[test,ios] Disable multiple mapsnapshotter test.
8 simultaneous mapsnapshotter test periodically deadlocks in simulator. Also, increase timeouts to decrease chance of spurious test failure.
-rw-r--r--platform/ios/Integration Tests/Snapshotter Tests/MGLMapSnapshotterTest.m20
1 files changed, 9 insertions, 11 deletions
diff --git a/platform/ios/Integration Tests/Snapshotter Tests/MGLMapSnapshotterTest.m b/platform/ios/Integration Tests/Snapshotter Tests/MGLMapSnapshotterTest.m
index f31f9cf787..6a698121c9 100644
--- a/platform/ios/Integration Tests/Snapshotter Tests/MGLMapSnapshotterTest.m
+++ b/platform/ios/Integration Tests/Snapshotter Tests/MGLMapSnapshotterTest.m
@@ -104,12 +104,11 @@ NSString* validAccessToken() {
[self waitForExpectations:@[expectation] timeout:2.0];
}
-- (void)testMultipleSnapshottersFromBackgroundQueue {
+- (void)testSnapshotterFromBackgroundQueue {
if (!validAccessToken()) {
return;
}
- // Crashes with only 1 snapshot
CGSize size = self.mapView.bounds.size;
CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(30.0, 30.0);
@@ -145,10 +144,9 @@ NSString* validAccessToken() {
MGLTestAssertNotNil(strongself, snapshot.image);
MGLTestAssertNil(strongself, error, @"Snapshot should not error with: %@", error);
- // Change this back to XCTAttachmentLifetimeDeleteOnSuccess when we're sure this
- // test is passing.
+ // Change this to XCTAttachmentLifetimeKeepAlways to be able to look at the snapshots after running
XCTAttachment *attachment = [XCTAttachment attachmentWithImage:snapshot.image];
- attachment.lifetime = XCTAttachmentLifetimeKeepAlways;
+ attachment.lifetime = XCTAttachmentLifetimeDeleteOnSuccess;
[strongself addAttachment:attachment];
dispatch_group_leave(group);
@@ -174,10 +172,11 @@ NSString* validAccessToken() {
});
});
- [self waitForExpectations:@[expectation] timeout:10.0];
+ [self waitForExpectations:@[expectation] timeout:60.0];
}
-- (void)testMultipleSnapshotters {
+- (void)testMultipleSnapshottersPENDING {
+ MGL_CHECK_IF_PENDING_TEST_SHOULD_RUN();
if (!validAccessToken()) {
return;
}
@@ -217,10 +216,9 @@ NSString* validAccessToken() {
MGLTestAssertNotNil(strongself, snapshot.image);
MGLTestAssertNil(strongself, error, @"Snapshot should not error with: %@", error);
- // Change this back to XCTAttachmentLifetimeDeleteOnSuccess when we're sure this
- // test is passing.
+ // Change this to XCTAttachmentLifetimeKeepAlways to be able to look at the snapshots after running
XCTAttachment *attachment = [XCTAttachment attachmentWithImage:snapshot.image];
- attachment.lifetime = XCTAttachmentLifetimeKeepAlways;
+ attachment.lifetime = XCTAttachmentLifetimeDeleteOnSuccess;
[strongself addAttachment:attachment];
// Dealloc the snapshotter (by having this line in the block, we
@@ -233,7 +231,7 @@ NSString* validAccessToken() {
}];
} // end for loop
- [self waitForExpectations:@[expectation] timeout:20.0];
+ [self waitForExpectations:@[expectation] timeout:60.0];
}
@end