Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jason-simmons
Copy link
Member

  • Return errors from the HandlePlatformMessage call in PlatformConfigurationNativeApi::SendPortPlatformMessage
  • Clear the PlatformDispatcher onError handler installed by one of the tests. This handler can cause an infinite loop if a later test throws an exception.
  • Wait for completion of async tests.

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, the change to the runtime logic should have a test. Let me know if you need help adding the test.

void hooksTests() {
void test(String name, VoidCallback testFunction) {
void hooksTests() async {
Future<void> test(String name, FutureOr<void> testFunction()) async {
Copy link
Member

Choose a reason for hiding this comment

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

Wow, I didn't know Dart could do this, is this idiomatic as opposed to having FutureOr<void> Function() testFunction?

Copy link
Member Author

Choose a reason for hiding this comment

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

HandlePlatformMessage(dart_state, name, data_handle, response);

return Dart_Null();
return HandlePlatformMessage(dart_state, name, data_handle, response);
Copy link
Member

Choose a reason for hiding this comment

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

This should have a test.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is already tested by https://github.com/flutter/engine/blob/main/lib/ui/fixtures/ui_test.dart#L929

That test was actually failing. But the failure was not being reported properly due to the other issues addressed by this PR.

* Return errors from the HandlePlatformMessage call in
  PlatformConfigurationNativeApi::SendPortPlatformMessage
* Clear the PlatformDispatcher onError handler installed by one of the tests.
  This handler can cause an infinite loop if a later test throws an exception.
* Wait for completion of async tests.
@jason-simmons jason-simmons force-pushed the hooks_test_infinite_loop branch from 130df1c to 917338e Compare October 13, 2022 20:18
@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 13, 2022
@auto-submit auto-submit bot merged commit d135c95 into flutter:main Oct 13, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants