-
Notifications
You must be signed in to change notification settings - Fork 219
Fix an issue with failed assertions using setUpAll/tearDownAll #2499
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
Conversation
When groups are filtered using `filter()` and not `onPlatform`, we would clone the group and tests without also cloning `setUpAll`/`tearDownAll`, which led to an assertion failure when trying to set the parents. This change ensures we clone tests in `filter()` like we do in `forPlatform()`. Fixes dart-lang#2498
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.
Go ahead and update the other package versions for a release as well.
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.
@@ -95,4 +95,19 @@ void main() { | |||
expect(test.stdout, neverEmits(contains('(setUpAll)'))); | |||
await test.shouldExit(0); | |||
}); | |||
|
|||
test('does not fail with asserts enabled - issue #2498', () 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.
I'm not sure why no existing tests triggered this, but did trigger when we didn't have the fix in onPlatform
, but I added specific tests for these referencing the issue.
Did you mean remove the |
PR HealthChangelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. |
It was removed from the sdk in https://dart-review.googlesource.com/c/sdk/+/426980, so broke our CI. The rest of the failures seem to be related to dart-lang/test#2499, and should be fixed later.
@jakemac53 I don't understand the Publish bot failure - the only messages I can see are about widening the version constraints, but all I did was remove |
This is expected, I will add the label to skip the check. Pub always warns about pinning deps - actually in this case though it should warn if we weren't pinning deps since we export those packages. But, it doesn't understand that. |
Got it, thanks! GitHub says there are workflows needing approval, although I', not sure what since everything seems to have a green tick. I think everything is done here, but let me know if you think there's anything outstanding I need to do. |
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
Revisions updated by `dart tools/rev_sdk_deps.dart`. protobuf (https://github.com/dart-lang/protobuf/compare/b7753f6..deda288): deda288 2025-05-19 Devon Carew address a merge issue with the protoc_plugin changelog (google/protobuf.dart#1002) 5ed4611 2025-05-19 Devon Carew shorten the deprecation messages for clone() and copyWith() (google/protobuf.dart#999) 4960b92 2025-05-19 Ömer Sinan Ağacan Switch to pub workspace (google/protobuf.dart#1001) test (https://github.com/dart-lang/test/compare/b9c59ea..5ffcb36): 5ffcb36f 2025-05-19 Danny Tuppeny Fix an issue with failed assertions using setUpAll/tearDownAll (dart-lang/test#2499) Change-Id: Idc43e2f2fd9dc38b80917b25b45bb954076dc1c9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429480 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Devon Carew <[email protected]>
When groups are filtered using
filter()
and notonPlatform
, we would clone the group and tests without also cloningsetUpAll
/tearDownAll
, which led to an assertion failure when trying to set the parents.This change ensures we clone tests in
filter()
like we do inforPlatform()
.Fixes #2498