-
Notifications
You must be signed in to change notification settings - Fork 210
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
Fix order-dependent test: test the correct instance(s). #3844
Conversation
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
PR HealthChangelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. |
@@ -738,36 +738,37 @@ int? get x => 1; | |||
} | |||
''', | |||
}, (resolver) async { |
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.
Does this still have to be async? Or should the calls actually be await resolver.libraryFor
as below?
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.
Actually, reverted that attempt at a fix.
I realized both these tests were missing resolvers: createResolvers()
, which means all four test variants were testing the same shared instance. So, that's the correct fix--done. Thanks!
test('are reported for part files with errors', () { | ||
return resolveSources({ | ||
test('are reported for part files with errors', () async { | ||
await resolveSources({ | ||
'a|lib.dart': ''' | ||
library a_library; | ||
part 'errors.dart'; |
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.
I can seemingly not put comments on lines further down --- but why does these in particular have to change when stuff further down looks to be done the same way as these were before?
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.
Yeah, GitHub doesn't let you comment on unchanged lines--an annoying limitation.
The tests were actually correct, reverted, added resolvers: createResolvers()
so we test the right instance, which is now I hope the correct fix :) thanks!
5319d0c
to
27d7523
Compare
No description provided.