[ios] prevent a race condition by not fulfilling the expectation until the view has been added (#5507)

This commit is contained in:
Fredrik Karlsson
2016-06-29 13:57:49 +02:00
committed by GitHub
parent 16b859ff5f
commit bf079a285f

View File

@@ -84,9 +84,12 @@ static NSString * const MGLTestAnnotationReuseIdentifer = @"MGLTestAnnotationReu
_annotationView = annotationView;
[_expectation fulfill];
return annotationView;
}
- (void)mapView:(MGLMapView *)mapView didAddAnnotationViews:(NSArray<MGLAnnotationView *> *)annotationViews
{
[_expectation fulfill];
}
@end