-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[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
[platform_view]terminate the app in tear down for platform view xcuitest #109720
Conversation
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. |
looks like our CI fails to identify this file as test files (not sure who is the POC for this) |
test-exempt: is a test |
@hellohuanlin you need to rebase onto top of tree, you're on a very old commit with outdated Cirrus credentials #109722 |
5c03c0e
to
c17576d
Compare
self.continueAfterFailure = NO; | ||
|
||
self.app = [[XCUIApplication alloc] init]; | ||
[self.app launch]; | ||
} | ||
|
||
- (void)tearDown { | ||
[self.app terminate]; |
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.
Can you add a comment describing the bug you're trying to work around? In theory it shouldn't be needed.
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
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.