Skip to content

e2e iOS: Test runner doesn't exit #48601

@gaaclarke

Description

@gaaclarke

e2e version: 0.2.3

When using e2e with iOS unit tests, my test never quits and gets stuck running the event loop. Here is the backtrace:

Thread 1 Queue : com.apple.main-thread (serial)
#0	0x00007fff523b622a in mach_msg_trap ()
#1	0x00007fff523b676c in mach_msg ()
#2	0x00007fff23bd3cf5 in __CFRunLoopServiceMachPort ()
#3	0x00007fff23bcea17 in __CFRunLoopRun ()
#4	0x00007fff23bce066 in CFRunLoopRunSpecific ()
#5	0x0000000107c504e9 in -[E2EIosTest testE2E:] at /Users/aaclarke/dev/flutter/.pub-cache/hosted/pub.dartlang.org/e2e-0.2.3/ios/Classes/E2EIosTest.m:9
#6	0x0000000107c4fe3f in -[RunnerTests testE2E] at /Users/aaclarke/dev/dartle/google3/experimental/users/aaclarke/dartle/tests/test_objc/ios/RunnerTests/RunnerTests.m:4
#7	0x00007fff23c7820c in __invoking___ ()
#8	0x00007fff23c753af in -[NSInvocation invoke] ()
#9	0x0000000107aa0821 in __24-[XCTestCase invokeTest]_block_invoke.208 ()
#10	0x0000000107afa9b9 in -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] ()
#11	0x0000000107afa8d7 in -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] ()
#12	0x0000000107aa030a in __24-[XCTestCase invokeTest]_block_invoke ()
#13	0x0000000107a9fde2 in -[XCTestCase testContextPerformInScope:] ()
#14	0x0000000107a9fe7c in -[XCTestCase invokeTest] ()
#15	0x0000000107aa1bed in __26-[XCTestCase performTest:]_block_invoke_2 ()
#16	0x0000000107afa9b9 in -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] ()
#17	0x0000000107afa8d7 in -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] ()
#18	0x0000000107aa1b04 in __26-[XCTestCase performTest:]_block_invoke.334 ()
#19	0x0000000107b0e302 in +[XCTContext runInContextForTestCase:block:] ()
#20	0x0000000107aa1273 in -[XCTestCase performTest:] ()
#21	0x0000000107ae6807 in -[XCTest runTest] ()
#22	0x0000000107a9b84a in __27-[XCTestSuite performTest:]_block_invoke ()
#23	0x0000000107a9af74 in -[XCTestSuite _performProtectedSectionForTest:testSection:] ()
#24	0x0000000107a9b271 in -[XCTestSuite performTest:] ()
#25	0x0000000107ae6807 in -[XCTest runTest] ()
#26	0x0000000107a9b84a in __27-[XCTestSuite performTest:]_block_invoke ()
#27	0x0000000107a9af74 in -[XCTestSuite _performProtectedSectionForTest:testSection:] ()
#28	0x0000000107a9b271 in -[XCTestSuite performTest:] ()
#29	0x0000000107ae6807 in -[XCTest runTest] ()
#30	0x0000000107a9b84a in __27-[XCTestSuite performTest:]_block_invoke ()
#31	0x0000000107a9af74 in -[XCTestSuite _performProtectedSectionForTest:testSection:] ()
#32	0x0000000107a9b271 in -[XCTestSuite performTest:] ()
#33	0x0000000107ae6807 in -[XCTest runTest] ()
#34	0x0000000107b1d28e in __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke ()
#35	0x0000000107b1d391 in __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.84 ()
#36	0x0000000107ab5593 in -[XCTestObservationCenter _observeTestExecutionForBlock:] ()
#37	0x0000000107b1d04d in -[XCTTestRunSession runTestsAndReturnError:] ()
#38	0x0000000107a7edd7 in -[XCTestDriver runTestsAndReturnError:] ()
#39	0x0000000107b0a554 in _XCTestMain ()
#40	0x000000010574bbe7 in __RunTests_block_invoke_2 ()
#41	0x00007fff23bd429c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#42	0x00007fff23bd3a08 in __CFRunLoopDoBlocks ()
#43	0x00007fff23bce894 in __CFRunLoopRun ()
#44	0x00007fff23bce066 in CFRunLoopRunSpecific ()
#45	0x00007fff384c0bb0 in GSEventRunModal ()
#46	0x00007fff48092d4d in UIApplicationMain ()
#47	0x0000000105693cc0 in main at /Users/aaclarke/dev/dartle/google3/experimental/users/aaclarke/dartle/tests/test_objc/ios/Runner/main.m:7
#48	0x00007fff5227ec25 in start ()
#49	0x00007fff5227ec25 in start ()

Here is the loop:

  while (!e2ePlugin.testResults) {
    CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.f, NO);
  }

It seems e2ePlugin.testResults never is set to true.

cc @collinjackson

Metadata

Metadata

Assignees

No one assigned

    Labels

    f: integration_testThe flutter/packages/integration_test pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions