-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[e2e] Fixed bug in e2e for ios where it doesn't exit. #2465
Conversation
|
Defer to @collinjackson as I'm not familiar with objc. |
You mean the bundles were being loaded multiple times? That seems odd. Why did that prevent exit? |
This will loop forever since the test results are set on the other instance of the plugin.
|
Ohhh because e2e is a static library and the dispatch_once_t is being set in both the Runner and RunnerTest bundles. |
jmagman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, would like a nice comment about your pattern.
| + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar { | ||
| } | ||
|
|
||
| - (void)setupChannels:(id<FlutterBinaryMessenger>)binaryMessenger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment here for why you did this, mentioning the static issue if e2e plugin is linked as a static library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
I've let this go dormant, sorry. It appears that this only fixes the hang for the case where tests are passing. It still hangs if one of the tests fails. I'm going to update the issue with better reproduction. |
Co-authored-by: Collin Jackson <jackson@google.com>
Co-authored-by: Collin Jackson <jackson@google.com>
Co-authored-by: Collin Jackson <jackson@google.com>
Description
Fixed problem with XCTest in XCode 11.3 where the testing bundles were getting opened multiple times which interfered with the singleton logic for E2EPlugin.
Related Issues
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?