Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[platform_view]terminate the app in tear down for platform view xcuitest #109720

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

Conversation

hellohuanlin
Copy link
Contributor

This test failure is due to the previously installed app is not terminated in the previous test.

This seems to be a bug in XCUITest. There are many similar issues online, such as this, this and this

Radar: this and this

A promising solution is to retry launch if the first launch fails, as described here.

I noticed that we did not terminate the app in tearDown. Our other tests do not have tearDown either, but it's worth a try. If it doesn't work, we can try relaunching the app.

List which issues are fixed by this PR. You must list at least one issue.
Fixes
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Fixes #109697

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.

@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Aug 17, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@hellohuanlin
Copy link
Contributor Author

looks like our CI fails to identify this file as test files (not sure who is the POC for this)

@Hixie
Copy link
Contributor

Hixie commented Aug 17, 2022

test-exempt: is a test

@jmagman
Copy link
Member

jmagman commented Aug 17, 2022

@hellohuanlin you need to rebase onto top of tree, you're on a very old commit with outdated Cirrus credentials #109722

@hellohuanlin hellohuanlin force-pushed the platform_view_xcuitest_terminate_tear_down branch from 5c03c0e to c17576d Compare August 17, 2022 21:41
self.continueAfterFailure = NO;

self.app = [[XCUIApplication alloc] init];
[self.app launch];
}

- (void)tearDown {
[self.app terminate];
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment describing the bug you're trying to work around? In theory it shouldn't be needed.

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 c: contributor-productivity Team-specific productivity, code health, technical debt.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mac_ios native_platform_view_ui_tests_ios is 1.01% flaky
3 participants