Repository: flutter
Issue: testReleaseFlutterViewController - Engine failed to release
Labels: a: tests,c: regression,team,engine,a: existing-apps,P2,team-engine,triaged-engine

I saw this on a PR I was working on:

```
Running add-to-app iOS integration tests...
▌12:11:26▐ RUNNING: cd dev/integration_tests/ios_add2app; ../../../build_and_test.sh 
/private/tmp/flutter sdk/dev/integration_tests/ios_add2app/flutterapp /private/tmp/flutter sdk/dev/integration_tests/ios_add2app
Downloading ios tools...                                           33.6s
Downloading ios-profile tools...                                   26.1s
Downloading ios-release tools...                                  107.7s
Building com.example.iosAdd2appFlutter for simulator (ios)...
Running Xcode build...                                          
Xcode build done.                                           36.0s
Built /private/tmp/flutter sdk/dev/integration_tests/ios_add2app/flutterapp/build/ios/iphonesimulator/Runner.app.
/private/tmp/flutter sdk/dev/integration_tests/ios_add2app
Analyzing dependencies
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
Downloading dependencies
Installing EarlGrey (1.15.1)
Installing Flutter (1.0.0)
Installing FlutterPluginRegistrant (0.0.1)
Installing ios_add2app_flutter (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 4 dependencies from the Podfile and 4 total pods installed.
/usr/local/bin/xcpretty
▸ Compiling Pods-ios_add2appTests-dummy.m
▸ Compiling FlutterPluginRegistrant-dummy.m
▸ Compiling GeneratedPluginRegistrant.m
▸ Building library libPods-ios_add2appTests.a
▸ Building library libFlutterPluginRegistrant.a
▸ Compiling Pods-ios_add2app-dummy.m
▸ Building library libPods-ios_add2app.a
▸ Running script '[CP] Check Pods Manifest.lock'
▸ Running script '[CP-User] Run Flutter Build Script'
▸ Compiling MainViewController.m
▸ Compiling NativeViewController.m
▸ Compiling main.m
▸ Compiling HybridViewController.m
▸ Compiling FullScreenViewController.m
▸ Compiling DualFlutterViewController.m
▸ Compiling AppDelegate.m
▸ Linking ios_add2app
▸ Compiling Launch\ Screen.storyboard
▸ Processing Info.plist
▸ Running script '[CP] Embed Pods Frameworks'
▸ Touching ios_add2app.app (in target: ios_add2app)
▸ Processing Info.plist
▸ Running script '[CP] Check Pods Manifest.lock'
▸ Compiling IntegrationTests.m
▸ Compiling FlutterViewControllerTests.m
▸ Linking ios_add2appTests
▸ Copying /tmp/flutter\ sdk/dev/integration_tests/ios_add2app/Pods/EarlGrey/EarlGrey/EarlGrey.framework
▸ Running script '[CP] Embed Pods Frameworks'
▸ Copying /Applications/Xcode-10.2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/XCTAutomationSupport.framework
▸ Copying /Applications/Xcode-10.2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks/XCTest.framework
▸ Copying /Applications/Xcode-10.2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/lib/libXCTestBundleInject.dylib
▸ Touching ios_add2appTests.xctest (in target: ios_add2appTests)
2019-10-07 12:15:56.581 xcodebuild[95978:171247]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/anka/Library/Developer/Xcode/DerivedData/ios_add2app-csiwhdwugybmwjeggtidemdjpolj/Logs/Test/Test-ios_add2appTests-2019.10.07_12-15-23--0700.xcresult/1_Test/Diagnostics/ios_add2appTests-00CB5F11-59D5-409D-9036-1A25FDC64376/ios_add2appTests-D220C3D6-ECEA-494B-865F-DDF9EA725B79/Session-ios_add2appTests-2019-10-07_121556-pLDeOu.log
2019-10-07 12:15:56.583 xcodebuild[95978:170218] [MT] IDETestOperationsObserverDebug: (85BF7B99-172F-4555-9F54-5AA3472A64D7) Beginning test session ios_add2appTests-85BF7B99-172F-4555-9F54-5AA3472A64D7 at 2019-10-07 12:15:56.582 with Xcode 10E125 on target <DVTiPhoneSimulator: 0x7f81c6155350> {
		SimDevice: iPhone X (30AB7C65-B526-4C4B-AE55-E6C7C8D8B47F, iOS 12.2, Shutdown)
} (12.2 (16E226))
2019-10-07 12:16:58.058 xcodebuild[95978:170218] [MT] IDETestOperationsObserverDebug: (85BF7B99-172F-4555-9F54-5AA3472A64D7) Finished requesting crash reports. Continuing with testing.
All tests
Test Suite ios_add2appTests.xctest started
FlutterTests
    ✓ testDualFlutterView (14.059 seconds)
    ✓ testFullScreenCanPop (9.309 seconds)
    ✓ testHybridView (28.382 seconds)
ViewControllerRelease
    ✗ testReleaseFlutterViewController, ((weakEngine) == nil) failed: "<FlutterEngine: 0x600000040690>" - Engine failed to release.
ViewControllerRelease
  testReleaseFlutterViewController, ((weakEngine) == nil) failed: "<FlutterEngine: 0x600000040690>" - Engine failed to release.
  /tmp/flutter sdk/dev/integration_tests/ios_add2app/ios_add2appTests/FlutterViewControllerTests.m:24
 }
 XCTAssertNil(weakEngine, @"Engine failed to release.");
}
```
  ```
	 Executed 4 tests, with 1 failure (0 unexpected) in 52.207 (52.222) seconds
2019-10-07 12:18:08.160 xcodebuild[95978:170218] [MT] IDETestOperationsObserverDebug: 131.607 elapsed -- Testing started completed.
2019-10-07 12:18:08.161 xcodebuild[95978:170218] [MT] IDETestOperationsObserverDebug: 0.001 sec, +0.001 sec -- start
2019-10-07 12:18:08.161 xcodebuild[95978:170218] [MT] IDETestOperationsObserverDebug: 131.607 sec, +131.607 sec -- end
Failing tests:
	ios_add2appTests:
		-[ViewControllerRelease testReleaseFlutterViewController]
Test session results and logs:
	/Users/anka/Library/Developer/Xcode/DerivedData/ios_add2app-csiwhdwugybmwjeggtidemdjpolj/Logs/Test/Test-ios_add2appTests-2019.10.07_12-15-23--0700.xcresult
** TEST FAILED **
▌12:13:22▐ ELAPSED TIME: 6min 48.661s for ../../../build_and_test.sh  in dev/integration_tests/ios_add2app
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ERROR: Last command exited with 65 (expected: zero).
Command: ../../../build_and_test.sh 
Relative working directory: dev/integration_tests/ios_add2app
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```

https://cirrus-ci.com/task/5629588356464640