From bf079a285fb3c2f618ae9672b79a926fca48efeb Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Wed, 29 Jun 2016 13:57:49 +0200 Subject: [PATCH] [ios] prevent a race condition by not fulfilling the expectation until the view has been added (#5507) --- platform/ios/test/MGLAnnotationViewTests.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/ios/test/MGLAnnotationViewTests.m b/platform/ios/test/MGLAnnotationViewTests.m index 6cc569839..65d7b3d35 100644 --- a/platform/ios/test/MGLAnnotationViewTests.m +++ b/platform/ios/test/MGLAnnotationViewTests.m @@ -84,9 +84,12 @@ static NSString * const MGLTestAnnotationReuseIdentifer = @"MGLTestAnnotationReu _annotationView = annotationView; - [_expectation fulfill]; - return annotationView; } +- (void)mapView:(MGLMapView *)mapView didAddAnnotationViews:(NSArray *)annotationViews +{ + [_expectation fulfill]; +} + @end