From 81c6a501b59ff91ce7b9eefe4fa6a6d8d0aa5a9d Mon Sep 17 00:00:00 2001 From: jmkiley Date: Thu, 25 Jun 2020 13:54:42 -0700 Subject: [PATCH] Update accessing the access token --- .../Annotation Tests/MGLAnnotationViewIntegrationTests.mm | 4 ++-- platform/ios/Integration Tests/MGLIntegrationTestCase.m | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/platform/ios/Integration Tests/Annotation Tests/MGLAnnotationViewIntegrationTests.mm b/platform/ios/Integration Tests/Annotation Tests/MGLAnnotationViewIntegrationTests.mm index 381a13664c..fa84999f45 100644 --- a/platform/ios/Integration Tests/Annotation Tests/MGLAnnotationViewIntegrationTests.mm +++ b/platform/ios/Integration Tests/Annotation Tests/MGLAnnotationViewIntegrationTests.mm @@ -813,8 +813,8 @@ - (void)waitForCollisionDetectionToRun { self.renderFinishedExpectation = [self expectationWithDescription:@"Map view should be rendered"]; XCTestExpectation *timerExpired = [self expectationWithDescription:@"Timer expires"]; - // Wait 1/2 second - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(NSEC_PER_SEC >> 1)), dispatch_get_main_queue(), ^{ + // Wait 1/2 second¨ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [timerExpired fulfill]; }); diff --git a/platform/ios/Integration Tests/MGLIntegrationTestCase.m b/platform/ios/Integration Tests/MGLIntegrationTestCase.m index caafbec422..c81611631b 100644 --- a/platform/ios/Integration Tests/MGLIntegrationTestCase.m +++ b/platform/ios/Integration Tests/MGLIntegrationTestCase.m @@ -44,13 +44,11 @@ - (void)setUp { NSString *accessToken; if ([self.name containsString:@"🔒"]) { - accessToken = [[NSProcessInfo processInfo] environment][@"MAPBOX_ACCESS_TOKEN"]; + accessToken = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MGLMapboxAccessToken"]; if (!accessToken) { - printf("warning: MAPBOX_ACCESS_TOKEN env var is required for test '%s' - trying anyway.\n", self.name.UTF8String); + printf("warning: MGLMapboxAccessToken info.plist key is required for test '%s' - trying anyway.\n", self.name.UTF8String); } } - - [MGLAccountManager setAccessToken:accessToken ?: @"pk.feedcafedeadbeefbadebede"]; } @end