-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Service.getInfo() does not work for test environment. #52354
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
Comments
Screen.Recording.2023-05-10.at.4.41.20.PM.mov |
So I've done some digging and I'm not sure exactly what's going on here. The call to the service isolate to get the URI completes successfully and the static Future<ServiceProtocolInfo> getInfo() async {
// Port to receive response from service isolate.
final RawReceivePort receivePort =
new RawReceivePort(null, 'Service.getInfo');
final Completer<String?> completer = new Completer<String?>();
receivePort.handler = (String? uriString) {
// This callback executes
completer.complete(uriString);
};
// Request the information from the service isolate.
_getServerInfo(receivePort.sendPort);
// Await the response from the service isolate.
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// **This future never completes**
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
String? uriString = await completer.future;
Uri? uri = uriString == null ? null : Uri.parse(uriString);
// Close the port.
receivePort.close();
return new ServiceProtocolInfo(uri);
} I wonder the event loop in |
@mraleph correctly identified this as an issue related to the use of |
Steps to repro:
See output
Obtaining info...
and the test never finishes.The output is from the code:
There is no error as well.
The text was updated successfully, but these errors were encountered: