From 737ebed7d5997872e8c1419cc6bfbb10ae6242d2 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Tue, 18 Sep 2018 13:55:23 -0700 Subject: [ios, tests] Bump most waitForExpectationsWithTimeout's to 5s [skip firebase] Bump MGLOfflineStorageTests timeouts to 5 seconds --- .../Annotation Tests/MGLAnnotationViewIntegrationTests.m | 2 +- platform/ios/Integration Tests/MBGLIntegrationTests.m | 2 +- platform/ios/Integration Tests/MGLCameraTransitionTests.mm | 14 +++++++------- platform/ios/Integration Tests/MGLMapViewIntegrationTest.m | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'platform/ios/Integration Tests') diff --git a/platform/ios/Integration Tests/Annotation Tests/MGLAnnotationViewIntegrationTests.m b/platform/ios/Integration Tests/Annotation Tests/MGLAnnotationViewIntegrationTests.m index ebd587ebe6..ba63a9eff4 100644 --- a/platform/ios/Integration Tests/Annotation Tests/MGLAnnotationViewIntegrationTests.m +++ b/platform/ios/Integration Tests/Annotation Tests/MGLAnnotationViewIntegrationTests.m @@ -102,7 +102,7 @@ [timerExpired fulfill]; }); - [self waitForExpectations:@[timerExpired, self.renderFinishedExpectation] timeout:1.0]; + [self waitForExpectations:@[timerExpired, self.renderFinishedExpectation] timeout:5]; } @end diff --git a/platform/ios/Integration Tests/MBGLIntegrationTests.m b/platform/ios/Integration Tests/MBGLIntegrationTests.m index 4f42c5a13f..aeff0ba6f3 100644 --- a/platform/ios/Integration Tests/MBGLIntegrationTests.m +++ b/platform/ios/Integration Tests/MBGLIntegrationTests.m @@ -186,7 +186,7 @@ XCTAssertNil(mapView2.style); self.styleLoadingExpectation = [self expectationWithDescription:@"Map view should finish loading style."]; - [self waitForExpectationsWithTimeout:1 handler:nil]; + [self waitForExpectationsWithTimeout:5 handler:nil]; MGLOpenGLStyleLayer *layer = [[MGLOpenGLStyleLayer alloc] initWithIdentifier:@"gl-layer"]; weakLayer = layer; diff --git a/platform/ios/Integration Tests/MGLCameraTransitionTests.mm b/platform/ios/Integration Tests/MGLCameraTransitionTests.mm index 0b28104c96..f29fa5e64c 100644 --- a/platform/ios/Integration Tests/MGLCameraTransitionTests.mm +++ b/platform/ios/Integration Tests/MGLCameraTransitionTests.mm @@ -34,7 +34,7 @@ [self.mapView setDirection:90 animated:YES]; // loop, render, and wait - [self waitForExpectations:@[expectation] timeout:1.5]; + [self waitForExpectations:@[expectation] timeout:5]; } @@ -62,7 +62,7 @@ }; [self.mapView setDirection:90 animated:YES]; - [self waitForExpectations:@[expectation] timeout:1.5]; + [self waitForExpectations:@[expectation] timeout:5]; } - (void)testInterruptingAndResetNorthOnlyOnceInIsChanging { @@ -106,7 +106,7 @@ }; [self.mapView setDirection:90 animated:YES]; - [self waitForExpectations:@[expectation] timeout:1.5]; + [self waitForExpectations:@[expectation] timeout:5]; XCTAssertEqualWithAccuracy(self.mapView.direction, 0.0, 0.001, @"Camera should have reset to north. %0.3f", self.mapView.direction); } @@ -222,7 +222,7 @@ // Should take MGLAnimationDuration seconds (0.3) [self.mapView setCenterCoordinate:target zoomLevel:15.0 animated:YES]; - [self waitForExpectations:@[expectation] timeout:1.5]; + [self waitForExpectations:@[expectation] timeout:5]; } - (void)testFlyToCameraInDelegateMethod { @@ -323,7 +323,7 @@ // Should take MGLAnimationDuration [self.mapView setCenterCoordinate:target zoomLevel:zoomLevel animated:YES]; - [self waitForExpectations:@[expectation] timeout:2.0]; + [self waitForExpectations:@[expectation] timeout:5]; NSLog(@"setCenterCoordinate: %0.4fs", stop1 - stop0); NSLog(@"flyToCamera: %0.4fs", stop2 - stop1); @@ -362,7 +362,7 @@ }; [self.mapView setDirection:90 animated:YES]; - [self waitForExpectations:@[expectation] timeout:1.5]; + [self waitForExpectations:@[expectation] timeout:5]; XCTAssertEqualWithAccuracy(self.mapView.direction, 0.0, 0.001, @"Camera should have reset to north. %0.3f", self.mapView.direction); } @@ -389,7 +389,7 @@ }; [self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(40.0, 40.0) animated:YES]; - [self waitForExpectations:@[expectation] timeout:1.5]; + [self waitForExpectations:@[expectation] timeout:5]; XCTAssertEqualWithAccuracy(self.mapView.direction, 0.0, 0.001, @"Camera should have reset to north. %0.3f", self.mapView.direction); } diff --git a/platform/ios/Integration Tests/MGLMapViewIntegrationTest.m b/platform/ios/Integration Tests/MGLMapViewIntegrationTest.m index 68023f3556..8235945676 100644 --- a/platform/ios/Integration Tests/MGLMapViewIntegrationTest.m +++ b/platform/ios/Integration Tests/MGLMapViewIntegrationTest.m @@ -33,7 +33,7 @@ [window makeKeyAndVisible]; if (!self.mapView.style) { - [self waitForMapViewToFinishLoadingStyleWithTimeout:1]; + [self waitForMapViewToFinishLoadingStyleWithTimeout:5]; } } -- cgit v1.2.1