Skip to content

Conversation

@Hixie
Copy link
Contributor

@Hixie Hixie commented Sep 17, 2020

The new test added in this PR would hang, because when you remove a message handler (by setting it to null) we tried to drain the messages, but since no handler was registered, we'd immediately add them back to the queue, which would then be drained, ad infinitum.

The new test added in this PR would hang, because when you remove a message handler (by setting it to null) we tried to drain the messages, but since no handler was registered, we'd immediately add them back to the queue, which would then be drained, ad infinitum.
@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Sep 17, 2020
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

LGTM, nit about nomenclature

expect(envelope, isNull);
});

test('can handle method call with no registered plugin (setting after)', () async {
Copy link
Member

Choose a reason for hiding this comment

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

FWIW the title for this test is confusing to me. "registered plugin"? "registered handler?"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

heh, this is one reason why in my ideal test framework there's no test names. :-)

I think it refers to what happens when a method call comes in but no plugin has registered a handler for that channel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(the name is identical to the previous test, all I did was make a copy of the test with a minor tweak)

Copy link
Member

Choose a reason for hiding this comment

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

Feel free to change that one too, it's equally confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants