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

Some tests of VersionFreshnessValidator are incorrect #104065

Open
royarg02 opened this issue May 18, 2022 · 0 comments
Open

Some tests of VersionFreshnessValidator are incorrect #104065

royarg02 opened this issue May 18, 2022 · 0 comments
Labels
a: tests "flutter test", flutter_test, or one of our tests P2 Important issues not at the top of the work list team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team

Comments

@royarg02
Copy link
Contributor

royarg02 commented May 18, 2022

Tests for checking whether VersionFreshnessValidator.run() is pinging the server or not (see this and these tests), have a bug. The line

expect(cache.setVersionStamp, true);

which is used to check whether there has been a write to the cache, only possible when the tool tries to ping the server, actually satisfy because of these lines:

await Future.wait<void>(<Future<void>>[
stamp.store(
newTimeWarningWasPrinted: now,
cache: cache,
),
Future<void>.delayed(pauseTime),
]);

VersionFreshnessValidator does not involve in pinging the server in anyway, instead it is handled by _getLatestAvailableFlutterDate.

@danagbemava-nc danagbemava-nc added in triage Presently being triaged by the triage team a: tests "flutter test", flutter_test, or one of our tests tool Affects the "flutter" command-line tool. See also t: labels. and removed in triage Presently being triaged by the triage team labels May 18, 2022
@christopherfujino christopherfujino added the P2 Important issues not at the top of the work list label May 31, 2022
@flutter-triage-bot flutter-triage-bot bot added team-tool Owned by Flutter Tool team triaged-tool Triaged by Flutter Tool team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: tests "flutter test", flutter_test, or one of our tests P2 Important issues not at the top of the work list team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team
Projects
None yet
Development

No branches or pull requests

3 participants