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

This commit is contained in:
Jonah Williams 2019-08-19 17:32:43 -07:00 committed by GitHub
parent 4d81b0c970
commit 7ed27b51a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -203,6 +203,9 @@ class ResidentWebRunner extends ResidentRunner {
});
websocketUri = Uri.parse(_debugConnection.uri);
}
if (websocketUri != null) {
printStatus('Debug service listening on $websocketUri.');
}
connectionInfoCompleter?.complete(
DebugConnectionInfo(wsUri: websocketUri)
);

View File

@ -88,12 +88,14 @@ void main() {
test('Can successfully run and connect to vmservice', () => testbed.run(() async {
_setupMocks();
final BufferLogger bufferLogger = logger;
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter,
));
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/');
}));