Skip to content

Commit

Permalink
stoped keeping the spawner alive
Browse files Browse the repository at this point in the history
  • Loading branch information
gaaclarke committed Dec 17, 2020
1 parent 54b2745 commit d4673d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,12 @@ - (BOOL)application:(UIApplication*)application
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

// TODO(https://github.com/flutter/flutter/issues/72019) Sharing threads doesn't work correctly yet
// so we need to keep the Spawning engine alive. Once this issue is fixed we can remove s_spawner.
static FlutterEngine* s_spawner;

- (FlutterEngine*)engineForTest:(NSString*)scenarioIdentifier {
if ([scenarioIdentifier isEqualToString:@"spawn_engine_works"]) {
if (s_spawner == nil) {
s_spawner = [[FlutterEngine alloc] initWithName:@"FlutterControllerTest" project:nil];
[s_spawner run];
}
return [s_spawner spawnWithEntrypoint:nil libraryURI:nil];
FlutterEngine* spawner = [[FlutterEngine alloc] initWithName:@"FlutterControllerTest"
project:nil];
[spawner run];
return [spawner spawnWithEntrypoint:nil libraryURI:nil];
} else {
FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"FlutterControllerTest"
project:nil];
Expand Down
2 changes: 1 addition & 1 deletion testing/scenario_app/run_ios_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ fi
cd ios/Scenarios
set -o pipefail && xcodebuild -sdk iphonesimulator \
-scheme Scenarios \
-destination 'platform=iOS Simulator,name=iPhone 8' \
-destination 'platform=iOS Simulator,OS=13.0,name=iPhone 8' \
test \
FLUTTER_ENGINE="$FLUTTER_ENGINE"

0 comments on commit d4673d9

Please sign in to comment.