Unverified Commit 7ed27b51 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

print service url when connecting to web applications (#38823)

parent 4d81b0c9
...@@ -203,6 +203,9 @@ class ResidentWebRunner extends ResidentRunner { ...@@ -203,6 +203,9 @@ class ResidentWebRunner extends ResidentRunner {
}); });
websocketUri = Uri.parse(_debugConnection.uri); websocketUri = Uri.parse(_debugConnection.uri);
} }
if (websocketUri != null) {
printStatus('Debug service listening on $websocketUri.');
}
connectionInfoCompleter?.complete( connectionInfoCompleter?.complete(
DebugConnectionInfo(wsUri: websocketUri) DebugConnectionInfo(wsUri: websocketUri)
); );
......
...@@ -88,12 +88,14 @@ void main() { ...@@ -88,12 +88,14 @@ void main() {
test('Can successfully run and connect to vmservice', () => testbed.run(() async { test('Can successfully run and connect to vmservice', () => testbed.run(() async {
_setupMocks(); _setupMocks();
final BufferLogger bufferLogger = logger;
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>(); final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run( unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter, connectionInfoCompleter: connectionInfoCompleter,
)); ));
final DebugConnectionInfo debugConnectionInfo = await connectionInfoCompleter.future; final DebugConnectionInfo debugConnectionInfo = await connectionInfoCompleter.future;
expect(bufferLogger.statusText, contains('Debug service listening on ws://127.0.0.1/abcd/'));
expect(debugConnectionInfo.wsUri.toString(), 'ws://127.0.0.1/abcd/'); expect(debugConnectionInfo.wsUri.toString(), 'ws://127.0.0.1/abcd/');
})); }));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment