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

write test to convince self of lack of timing issue #58011

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 2 commits into from
May 27, 2020

Conversation

jonahwilliams
Copy link
Contributor

Description

In #55864 a race condition was described where a done event is received before we finish connecting. This cannot happen, since async functions begin synchronously and the flag isWaitingForVm is tripped immediately, keeping onDone from exiting.

Closes #55864

At any rate, this test will keep things working.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 26, 2020
@@ -1196,6 +1196,48 @@ void main() {
}) async => mockVMService,
}));


// Don't use this outside of the test below.
Copy link
Contributor

@christopherfujino christopherfujino May 26, 2020

Choose a reason for hiding this comment

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

I know you don't like groups, but should we wrap this completer and the test to enforce not re-using it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good point - this is the right place to use one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM other than nit about group

@jonahwilliams jonahwilliams merged commit f77c669 into flutter:master May 27, 2020
@jonahwilliams jonahwilliams deleted the fix_timing-issue branch May 27, 2020 19:47
jonahwilliams pushed a commit that referenced this pull request May 27, 2020
jonahwilliams pushed a commit that referenced this pull request May 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race condition in onDone call of resident runner connect method
4 participants