Skip to content
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

[flutter_tools] Avoid duplicated calls to l10n generation #76066

Conversation

perqin
Copy link
Contributor

@perqin perqin commented Feb 15, 2021

This issue is concealed by incorrectly written test cases. verify should not be called until previous expect has finished, because the mock function may be called later after the expectation. This seems to be a common pitfall that should be avoided when testing asynchronous code, but isn't mentioned in Dart/Flutter's documentation.

This PR should close the issue #76065.
Fixes #76065

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 listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. Instead, I fixed the wrong test cases.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

This issue is concealed by incorrectly written test cases.
`verify` should not be called until previous `expect` has finished.
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 15, 2021
@google-cla google-cla bot added the cla: yes label Feb 15, 2021
Copy link
Contributor

@shihaohong shihaohong left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for reporting the problem, as well as the fix with tests!

@shihaohong shihaohong added a: internationalization Supporting other languages or locales. (aka i18n) waiting for tree to go green labels Feb 25, 2021
@fluttergithubbot fluttergithubbot merged commit 131f59f into flutter:master Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: internationalization Supporting other languages or locales. (aka i18n) tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The l10n generation is built twice
3 participants