Commit d9a0de37 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Use InternetAddress instead of String (#6922)

parent 49fa3f49
...@@ -20,7 +20,7 @@ import '../globals.dart'; ...@@ -20,7 +20,7 @@ import '../globals.dart';
import 'coverage_collector.dart'; import 'coverage_collector.dart';
final String _kSkyShell = Platform.environment['SKY_SHELL']; final String _kSkyShell = Platform.environment['SKY_SHELL'];
const String _kHost = '127.0.0.1'; final InternetAddress _kHost = InternetAddress.LOOPBACK_IP_V4;
const String _kRunnerPath = '/runner'; const String _kRunnerPath = '/runner';
const String _kShutdownPath = '/shutdown'; const String _kShutdownPath = '/shutdown';
...@@ -50,8 +50,8 @@ Future<_ServerInfo> _startServer() async { ...@@ -50,8 +50,8 @@ Future<_ServerInfo> _startServer() async {
else if (!socket.isCompleted && request.uri.path == _kShutdownPath) else if (!socket.isCompleted && request.uri.path == _kShutdownPath)
socket.completeError('Failed to start test'); socket.completeError('Failed to start test');
}); });
return new _ServerInfo(server, 'ws://$_kHost:${server.port}$_kRunnerPath', return new _ServerInfo(server, 'ws://${_kHost.address}:${server.port}$_kRunnerPath',
'ws://$_kHost:${server.port}$_kShutdownPath', socket.future); 'ws://${_kHost.address}:${server.port}$_kShutdownPath', socket.future);
} }
Future<Process> _startProcess(String mainPath, { String packages, int observatoryPort }) { Future<Process> _startProcess(String mainPath, { String packages, int observatoryPort }) {
...@@ -166,7 +166,7 @@ void main() { ...@@ -166,7 +166,7 @@ void main() {
Process processToKill = process; Process processToKill = process;
process = null; process = null;
CoverageCollector.instance.collectCoverage( CoverageCollector.instance.collectCoverage(
host: _kHost, host: _kHost.address,
port: observatoryPort, port: observatoryPort,
processToKill: processToKill processToKill: processToKill
); );
......
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