这是indexloc提供的服务,不要输入任何密码
Skip to content

Setup channels during IntegrationTest registration on iOS #123729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Mar 29, 2023

Allow iOS integration_tests to run from flutter drive and not just Xcode.

From #91668 (comment)

I wasn't able to get the originally reported stuck runloop from #48601 to reproduce, even when I totally reverted flutter/plugins#2465. I also validated flutter/plugins#2514 passes when it's reverted.

Talked to @gaaclarke and we suspect some precondition for the original bug have been resolved... somewhere. This code was moved from flutter/plugins to the SDK, making bisecting this tricky, and probably not worth it if I can't reproduce it from Xcode or the command line at all with either a static or dynamic linked integration_test. So let's try re-adding the +registerWithRegistrar channel setup removed in #48601.

Reverts flutter/plugins#2465 (not a clean revert but essentially the same thing).

Fixes #91668
Closes #116539

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@jmagman jmagman added the f: integration_test The flutter/packages/integration_test plugin label Mar 29, 2023
@jmagman jmagman self-assigned this Mar 29, 2023
@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Mar 29, 2023
@jmagman jmagman marked this pull request as ready for review March 30, 2023 02:30
+ (IntegrationTestPlugin *)instance;

- (void)setupChannels:(id<FlutterBinaryMessenger>)binaryMessenger;
+ (instancetype)instance;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this instancetype, that wasn't part of the revert.

Copy link
Contributor

@pdblasi-google pdblasi-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

}];
FlutterMethodChannel *channel = [FlutterMethodChannel methodChannelWithName:kIntegrationTestPluginChannel
binaryMessenger:registrar.messenger];
[registrar addMethodCallDelegate:[self instance] channel:channel];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future archeologists: The addMethodCallDelegate does the setMethodCallHandler logic that was originally used, so this is semantically the same as the previous setMethodCallHandler call.

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 30, 2023
@auto-submit auto-submit bot merged commit 64800c7 into flutter:master Mar 30, 2023
@jmagman jmagman mentioned this pull request Mar 30, 2023
8 tasks
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 31, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 1, 2023
@jmagman jmagman deleted the integration-test-register branch April 5, 2023 16:42
exaby73 pushed a commit to NevercodeHQ/flutter that referenced this pull request Apr 17, 2023
…3729)

Setup channels during IntegrationTest registration on iOS
@zubriktomas
Copy link

@pdblasi-google Hello, could you please tell me when do you expect this fix to be part of what future release?

@pdblasi-google
Copy link
Contributor

@zubriktomas

From the release process docs this is already available in the master channel and may be in beta as well. I'm not personally sure when it'll be a part of a stable release, but it should be in either the next stable or the one after that.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App f: integration_test The flutter/packages/integration_test plugin framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[integration_test] Plugin not registered unless running via XCTest
3 participants