Skip to content

Re-enable FlutterPluginAppLifeCycleDelegateTest testWillResignActive #72582

@zanderso

Description

@zanderso

Following flutter/engine#23014, this test started flaking regularly.

Test Case '-[FlutterPluginAppLifeCycleDelegateTest testWillResignActive]' started.
/opt/s/w/ir/cache/builder/src/out/ios_debug_sim/../../flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm:587: error: -[FlutterPluginAppLifeCycleDelegateTest testWillResignActive] : failed: caught "NSInternalInconsistencyException", "** Cannot use mock object OCClassMockObject(FlutterEngine) at 0x6000013ae080. This error usually occurs when a mock object is used after stopMocking has been called on it. In most cases it is not necessary to call stopMocking. If you know you have to, please make sure that the mock object is not used afterwards."
(
	0   CoreFoundation                      0x0000000110784bde __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x000000010fc20b20 objc_exception_throw + 48
	2   CoreFoundation                      0x0000000110784a1c +[NSException raise:format:] + 188
	3   libocmock_shared.dylib              0x000000012cec03e6 -[OCMockObject handleInvocation:] + 39
	4   libocmock_shared.dylib              0x000000012cec02c3 -[OCMockObject forwardInvocation:] + 30
	5   CoreFoundation                      0x0000000110789566 ___forwarding___ + 838
	6   CoreFoundation                      0x000000011078b7c8 __forwarding_prep_1___ + 120
	7   libios_test_flutter.dylib           0x000000012cf3e8e5 -[FlutterViewController surfaceUpdated:] + 187
	8   libios_test_flutter.dylib           0x000000012cf3f2df -[FlutterViewController applicationWillResignActive:] + 46
	9   CoreFoundation                      0x00000001106aec1c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
	10  CoreFoundation                      0x00000001106ae0a5 _CFXRegistrationPost1 + 421
	11  CoreFoundation                      0x00000001106ade0f ___CFXNotificationPost_block_invoke + 175
	12  CoreFoundation                      0x00000001107abfe3 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1811
	13  CoreFoundation                      0x00000001106ad776 _CFXNotificationPost + 950
	14  Foundation                          0x000000010f6ac429 -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
	15  libios_test_flutter.dylib           0x000000012cefaefb -[FlutterPluginAppLifeCycleDelegateTest testWillResignActive] + 151
	16  CoreFoundation                      0x000000011078b95c __invoking___ + 140
	17  CoreFoundation                      0x0000000110788d8f -[NSInvocation invoke] + 287
	18  XCTest                              0x000000012b7a6121 __24-[XCTestCase invokeTest]_block_invoke.208 + 78
	19  XCTest                              0x000000012b8001e2 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 57
	20  XCTest                              0x000000012b800100 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 96
	21  XCTest                              0x000000012b7a5c0a __24-[XCTestCase invokeTest]_block_invoke + 1153
	22  XCTest                              0x000000012b7a56e2 -[XCTestCase testContextPerformInScope:] + 211
	23  XCTest                              0x000000012b7a577c -[XCTestCase invokeTest] + 137
	24  XCTest                              0x000000012b7a74ed __26-[XCTestCase performTest:]_block_invoke_2 + 43
	25  XCTest                              0x000000012b8001e2 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 57
	26  XCTest                              0x000000012b800100 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 96
	27  XCTest                              0x000000012b7a7404 __26-[XCTestCase performTest:]_block_invoke.334 + 88
	28  XCTest                              0x000000012b813492 +[XCTContext runInContextForTestCase:block:] + 219
	29  XCTest                              0x000000012b7a6b73 -[XCTestCase performTest:] + 668
	30  XCTest                              0x000000012b7ec077 -[XCTest runTest] + 57
	31  XCTest                              0x000000012b7a114a __27-[XCTestSuite performTest:]_block_invoke + 365
	32  XCTest                              0x000000012b7a0874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54
	33  XCTest                              0x000000012b7a0b71 -[XCTestSuite performTest:] + 355
	34  XCTest                              0x000000012b7ec077 -[XCTest runTest] + 57
	35  XCTest                              0x000000012b7a114a __27-[XCTestSuite performTest:]_block_invoke + 365
	36  XCTest                              0x000000012b7a0874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54
	37  XCTest                              0x000000012b7a0b71 -[XCTestSuite performTest:] + 355
	38  XCTest                              0x000000012b7ec077 -[XCTest runTest] + 57
	39  XCTest                              0x000000012b7a114a __27-[XCTestSuite performTest:]_block_invoke + 365
	40  XCTest                              0x000000012b7a0874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54
	41  XCTest                              0x000000012b7a0b71 -[XCTestSuite performTest:] + 355
	42  XCTest                              0x000000012b7ec077 -[XCTest runTest] + 57
	43  XCTest                              0x000000012b82243e __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 171
	44  XCTest                              0x000000012b822541 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.84 + 118
	45  XCTest                              0x000000012b7bae83 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 588
	46  XCTest                              0x000000012b8221fd -[XCTTestRunSession runTestsAndReturnError:] + 623
	47  XCTest                              0x000000012b7846d7 -[XCTestDriver runTestsAndReturnError:] + 456
	48  XCTest                              0x000000012b80f6e4 _XCTestMain + 2484
	49  libXCTestBundleInject.dylib         0x000000010f417be7 __copy_helper_block_e8_32s + 0
	50  CoreFoundation                      0x00000001106e78ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
	51  CoreFoundation                      0x00000001106e7058 __CFRunLoopDoBlocks + 312
	52  CoreFoundation                      0x00000001106e1ee4 __CFRunLoopRun + 1284
	53  CoreFoundation                      0x00000001106e16b6 CFRunLoopRunSpecific + 438
	54  GraphicsServices                    0x000000011818cbb0 GSEventRunModal + 65
	55  UIKitCore                           0x0000000112f8aa67 UIApplicationMain + 1621
	56  IosUnitTests                        0x000000010f36a640 main + 112
	57  libdyld.dylib                       0x000000011162fcf5 start + 1
	58  ???                                 0x0000000000000005 0x0 + 5
)
Test Case '-[FlutterPluginAppLifeCycleDelegateTest testWillResignActive]' failed (7.052 seconds).

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly passengineflutter/engine related. See also e: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions