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

Fix analyzer failures #364

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions test/io_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ void main() {

channel.sink.add('ping');

channel.stream.listen(
expectAsync1((message) {
expect(message, equals('pong'));
channel.sink.close(3678, 'raisin');
}, count: 1),
onDone: expectAsync0(() {}));
channel.stream.listen(expectAsync1((message) {
expect(message, equals('pong'));
channel.sink.close(3678, 'raisin');
}), onDone: expectAsync0(() {}));
Copy link
Member

Choose a reason for hiding this comment

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

Can you expand on what failed here? Why can these streams now emit more than once? How does this relate to the analyzer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

During the downgrade analysis, the failure was:

Analyzing web_socket_channel...

   info - test/io_test.dart:74:1[9](https://github.com/dart-lang/web_socket_channel/actions/runs/9133840767/job/25118162898?pr=363#step:5:10) - The value of the argument is redundant because it matches the default value. Try removing the argument. - avoid_redundant_argument_values
   info - test/io_test.dart:[10](https://github.com/dart-lang/web_socket_channel/actions/runs/9133840767/job/25118162898?pr=363#step:5:11)1:19 - The value of the argument is redundant because it matches the default value. Try removing the argument. - avoid_redundant_argument_values

Copy link
Member

Choose a reason for hiding this comment

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

We should just drop --fatal-infos w/ downgrade, I think!

});

test('.connect communicates immediately using platform independent api',
Expand All @@ -94,12 +92,10 @@ void main() {

channel.sink.add('ping');

channel.stream.listen(
expectAsync1((message) {
expect(message, equals('pong'));
channel.sink.close(3678, 'raisin');
}, count: 1),
onDone: expectAsync0(() {}));
channel.stream.listen(expectAsync1((message) {
expect(message, equals('pong'));
channel.sink.close(3678, 'raisin');
}), onDone: expectAsync0(() {}));
});

test('.connect with an immediate call to close', () async {
Expand Down