[ios] prevent a race condition by not fulfilling the expectation until the view has been added (#5507)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user