Update flutter_tools to look for new VM service message (#97683)
* Update flutter_tools to look for new VM service message The Dart SDK will soon move away from the current Observatory message: "Observatory listening on ..." To a new message that no longer references Observatory: "Dart VM Service listening on ..." This change updates all tests with mocks to check for the new message and also adds support for the new message in ProtocolDiscovery. See https://github.com/dart-lang/sdk/issues/46756 * Fix some parsing locations * Fix analysis failures * Update message * Remove extra comment * Update message * Add globals prefix
This commit is contained in:
@@ -104,7 +104,7 @@ void main() {
|
||||
testUsingContext('finds observatory port and forwards', () async {
|
||||
device.onGetLogReader = () {
|
||||
fakeLogReader.addLine('Foo');
|
||||
fakeLogReader.addLine('Observatory listening on http://127.0.0.1:$devicePort');
|
||||
fakeLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:$devicePort');
|
||||
return fakeLogReader;
|
||||
};
|
||||
testDeviceManager.addDevice(device);
|
||||
@@ -133,7 +133,7 @@ void main() {
|
||||
testUsingContext('Fails with tool exit on bad Observatory uri', () async {
|
||||
device.onGetLogReader = () {
|
||||
fakeLogReader.addLine('Foo');
|
||||
fakeLogReader.addLine('Observatory listening on http://127.0.0.1:$devicePort');
|
||||
fakeLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:$devicePort');
|
||||
fakeLogReader.dispose();
|
||||
return fakeLogReader;
|
||||
};
|
||||
@@ -148,7 +148,7 @@ void main() {
|
||||
testUsingContext('accepts filesystem parameters', () async {
|
||||
device.onGetLogReader = () {
|
||||
fakeLogReader.addLine('Foo');
|
||||
fakeLogReader.addLine('Observatory listening on http://127.0.0.1:$devicePort');
|
||||
fakeLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:$devicePort');
|
||||
return fakeLogReader;
|
||||
};
|
||||
testDeviceManager.addDevice(device);
|
||||
@@ -223,7 +223,7 @@ void main() {
|
||||
testUsingContext('exits when observatory-port is specified and debug-port is not', () async {
|
||||
device.onGetLogReader = () {
|
||||
fakeLogReader.addLine('Foo');
|
||||
fakeLogReader.addLine('Observatory listening on http://127.0.0.1:$devicePort');
|
||||
fakeLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:$devicePort');
|
||||
return fakeLogReader;
|
||||
};
|
||||
testDeviceManager.addDevice(device);
|
||||
|
||||
@@ -200,7 +200,7 @@ void main() {
|
||||
'10',
|
||||
'app.apk'
|
||||
],
|
||||
stdout: '\n\nObservatory listening on http://127.0.0.1:456\n\n',
|
||||
stdout: '\n\nThe Dart VM service is listening on http://127.0.0.1:456\n\n',
|
||||
));
|
||||
processManager.addCommand(kShaCommand);
|
||||
processManager.addCommand(const FakeCommand(
|
||||
|
||||
@@ -370,7 +370,7 @@ void main() {
|
||||
FakeCommand(
|
||||
command: testConfig.runDebugCommand,
|
||||
completer: runDebugCompleter,
|
||||
stdout: 'Observatory listening on http://127.0.0.1:12345/abcd/\n',
|
||||
stdout: 'The Dart VM service is listening on http://127.0.0.1:12345/abcd/\n',
|
||||
),
|
||||
FakeCommand(
|
||||
command: testConfig.forwardPortCommand,
|
||||
@@ -411,7 +411,7 @@ void main() {
|
||||
FakeCommand(
|
||||
command: testConfigNonForwarding.runDebugCommand,
|
||||
completer: runDebugCompleter,
|
||||
stdout: 'Observatory listening on http://192.168.178.123:12345/abcd/\n'
|
||||
stdout: 'The Dart VM service is listening on http://192.168.178.123:12345/abcd/\n'
|
||||
),
|
||||
]
|
||||
);
|
||||
@@ -456,7 +456,7 @@ void main() {
|
||||
FakeCommand(
|
||||
command: testConfig.runDebugCommand,
|
||||
completer: runDebugCompleter,
|
||||
stdout: 'Observatory listening on http://127.0.0.1:12345/abcd/\n',
|
||||
stdout: 'The Dart VM service is listening on http://127.0.0.1:12345/abcd/\n',
|
||||
),
|
||||
FakeCommand(
|
||||
command: testConfig.forwardPortCommand,
|
||||
|
||||
@@ -81,7 +81,7 @@ void main() {
|
||||
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
||||
FakeCommand(
|
||||
command: const <String>['debug'],
|
||||
stdout: 'Observatory listening on http://127.0.0.1/0\n',
|
||||
stdout: 'The Dart VM service is listening on http://127.0.0.1/0\n',
|
||||
completer: completer,
|
||||
),
|
||||
]);
|
||||
@@ -118,7 +118,7 @@ void main() {
|
||||
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
||||
FakeCommand(
|
||||
command: const <String>['debug'],
|
||||
stdout: 'Observatory listening on http://127.0.0.1/0\n',
|
||||
stdout: 'The Dart VM service is listening on http://127.0.0.1/0\n',
|
||||
completer: completer,
|
||||
),
|
||||
]);
|
||||
@@ -140,7 +140,7 @@ void main() {
|
||||
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
||||
FakeCommand(
|
||||
command: const <String>['debug'],
|
||||
stdout: 'Observatory listening on http://127.0.0.1/0\n',
|
||||
stdout: 'The Dart VM service is listening on http://127.0.0.1/0\n',
|
||||
completer: completer,
|
||||
environment: const <String, String>{
|
||||
'FLUTTER_ENGINE_SWITCH_1': 'enable-dart-profiling=true',
|
||||
@@ -202,7 +202,7 @@ void main() {
|
||||
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
||||
FakeCommand(
|
||||
command: const <String>['debug'],
|
||||
stdout: 'Observatory listening on http://127.0.0.1/0\n',
|
||||
stdout: 'The Dart VM service is listening on http://127.0.0.1/0\n',
|
||||
completer: completer,
|
||||
environment: const <String, String>{
|
||||
'FLUTTER_ENGINE_SWITCH_1': 'enable-dart-profiling=true',
|
||||
@@ -251,7 +251,7 @@ void main() {
|
||||
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
||||
FakeCommand(
|
||||
command: const <String>['debug', 'arg1', 'arg2'],
|
||||
stdout: 'Observatory listening on http://127.0.0.1/0\n',
|
||||
stdout: 'The Dart VM service is listening on http://127.0.0.1/0\n',
|
||||
completer: completer,
|
||||
),
|
||||
]);
|
||||
|
||||
@@ -247,7 +247,7 @@ void main() {
|
||||
'--packages=.dart_tool/package_config.json',
|
||||
'example.dill'
|
||||
],
|
||||
stdout: 'Observatory listening on http://localhost:1234',
|
||||
stdout: 'The Dart VM service is listening on http://localhost:1234',
|
||||
stderr: 'failure',
|
||||
)
|
||||
]);
|
||||
|
||||
@@ -128,7 +128,7 @@ void main() {
|
||||
// Start writing messages to the log reader.
|
||||
Timer.run(() {
|
||||
deviceLogReader.addLine('Foo');
|
||||
deviceLogReader.addLine('Observatory listening on http://127.0.0.1:456');
|
||||
deviceLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:456');
|
||||
});
|
||||
|
||||
final LaunchResult launchResult = await device.startApp(iosApp,
|
||||
@@ -166,7 +166,7 @@ void main() {
|
||||
// Start writing messages to the log reader.
|
||||
Timer.run(() {
|
||||
deviceLogReader.addLine('Foo');
|
||||
deviceLogReader.addLine('Observatory listening on http://127.0.0.1:456');
|
||||
deviceLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:456');
|
||||
});
|
||||
|
||||
final LaunchResult launchResult = await device.startApp(iosApp,
|
||||
@@ -206,7 +206,7 @@ void main() {
|
||||
Timer.run(() async {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 1));
|
||||
deviceLogReader.addLine('Foo');
|
||||
deviceLogReader.addLine('Observatory listening on http://127.0.0.1:456');
|
||||
deviceLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:456');
|
||||
});
|
||||
|
||||
final LaunchResult launchResult = await device.startApp(iosApp,
|
||||
@@ -311,7 +311,7 @@ void main() {
|
||||
|
||||
// Start writing messages to the log reader.
|
||||
Timer.run(() {
|
||||
deviceLogReader.addLine('Observatory listening on http://127.0.0.1:1234');
|
||||
deviceLogReader.addLine('The Dart VM service is listening on http://127.0.0.1:1234');
|
||||
});
|
||||
|
||||
final LaunchResult launchResult = await device.startApp(iosApp,
|
||||
|
||||
@@ -495,7 +495,7 @@ void main() {
|
||||
..addCommand(const FakeCommand(
|
||||
command: <String>['tail', '-n', '0', '-F', 'system.log'],
|
||||
stdout: '''
|
||||
Dec 20 17:04:32 md32-11-vm1 My Super Awesome App[88374]: flutter: Observatory listening on http://127.0.0.1:64213/1Uoeu523990=/
|
||||
Dec 20 17:04:32 md32-11-vm1 My Super Awesome App[88374]: flutter: The Dart VM service is listening on http://127.0.0.1:64213/1Uoeu523990=/
|
||||
Dec 20 17:04:32 md32-11-vm1 Another App[88374]: Ignore this text'''
|
||||
))
|
||||
..addCommand(const FakeCommand(
|
||||
@@ -514,7 +514,7 @@ Dec 20 17:04:32 md32-11-vm1 Another App[88374]: Ignore this text'''
|
||||
|
||||
final List<String> lines = await logReader.logLines.toList();
|
||||
expect(lines, <String>[
|
||||
'flutter: Observatory listening on http://127.0.0.1:64213/1Uoeu523990=/',
|
||||
'flutter: The Dart VM service is listening on http://127.0.0.1:64213/1Uoeu523990=/',
|
||||
]);
|
||||
expect(fakeProcessManager.hasRemainingExpectations, isFalse);
|
||||
}, overrides: <Type, Generator>{
|
||||
@@ -529,7 +529,7 @@ Dec 20 17:04:32 md32-11-vm1 Another App[88374]: Ignore this text'''
|
||||
..addCommand(const FakeCommand(
|
||||
command: <String>['tail', '-n', '0', '-F', 'system.log'],
|
||||
stdout: '''
|
||||
2017-09-13 15:26:57.228948-0700 localhost My Super Awesome App[37195]: (Flutter) Observatory listening on http://127.0.0.1:57701/
|
||||
2017-09-13 15:26:57.228948-0700 localhost My Super Awesome App[37195]: (Flutter) The Dart VM service is listening on http://127.0.0.1:57701/
|
||||
2017-09-13 15:26:57.228948-0700 localhost My Super Awesome App[37195]: (Flutter) ))))))))))
|
||||
2017-09-13 15:26:57.228948-0700 localhost My Super Awesome App[37195]: (Flutter) #0 Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)'''
|
||||
))
|
||||
@@ -549,7 +549,7 @@ Dec 20 17:04:32 md32-11-vm1 Another App[88374]: Ignore this text'''
|
||||
|
||||
final List<String> lines = await logReader.logLines.toList();
|
||||
expect(lines, <String>[
|
||||
'Observatory listening on http://127.0.0.1:57701/',
|
||||
'The Dart VM service is listening on http://127.0.0.1:57701/',
|
||||
'))))))))))',
|
||||
'#0 Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)',
|
||||
]);
|
||||
|
||||
@@ -61,7 +61,7 @@ void main() {
|
||||
command: const <String>[
|
||||
'/.tmp_rand0/flutter_preview.rand0/splash'
|
||||
],
|
||||
stdout: 'Observatory listening on http://127.0.0.1:64494/fZ_B2N6JRwY=/\n',
|
||||
stdout: 'The Dart VM service is listening on http://127.0.0.1:64494/fZ_B2N6JRwY=/\n',
|
||||
completer: completer,
|
||||
)
|
||||
]),
|
||||
|
||||
@@ -37,7 +37,7 @@ void main() {
|
||||
|
||||
testWithoutContext('discovers uri if logs already produced output', () async {
|
||||
logReader.addLine('HELLO WORLD');
|
||||
logReader.addLine('Observatory listening on http://127.0.0.1:9999');
|
||||
logReader.addLine('The Dart VM service is listening on http://127.0.0.1:9999');
|
||||
final Uri uri = (await discoverer.uri)!;
|
||||
expect(uri.port, 9999);
|
||||
expect('$uri', 'http://127.0.0.1:9999');
|
||||
@@ -45,9 +45,9 @@ void main() {
|
||||
|
||||
testWithoutContext('does not discover uri with no host', () async {
|
||||
final Future<Uri?> pendingUri = discoverer.uri;
|
||||
logReader.addLine('Observatory listening on http12asdasdsd9999');
|
||||
logReader.addLine('The Dart VM service is listening on http12asdasdsd9999');
|
||||
await Future<void>.delayed(const Duration(milliseconds: 10));
|
||||
logReader.addLine('Observatory listening on http://127.0.0.1:9999');
|
||||
logReader.addLine('The Dart VM service is listening on http://127.0.0.1:9999');
|
||||
|
||||
await Future<void>.delayed(Duration.zero);
|
||||
|
||||
@@ -59,7 +59,7 @@ void main() {
|
||||
|
||||
testWithoutContext('discovers uri if logs already produced output and no listener is attached', () async {
|
||||
logReader.addLine('HELLO WORLD');
|
||||
logReader.addLine('Observatory listening on http://127.0.0.1:9999');
|
||||
logReader.addLine('The Dart VM service is listening on http://127.0.0.1:9999');
|
||||
|
||||
await Future<void>.delayed(Duration.zero);
|
||||
|
||||
@@ -70,7 +70,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWithoutContext('uri throws if logs produce bad line and no listener is attached', () async {
|
||||
logReader.addLine('Observatory listening on http://127.0.0.1:apple');
|
||||
logReader.addLine('The Dart VM service is listening on http://127.0.0.1:apple');
|
||||
|
||||
await Future<void>.delayed(Duration.zero);
|
||||
|
||||
@@ -79,21 +79,21 @@ void main() {
|
||||
|
||||
testWithoutContext('discovers uri if logs not yet produced output', () async {
|
||||
final Future<Uri?> uriFuture = discoverer.uri;
|
||||
logReader.addLine('Observatory listening on http://127.0.0.1:3333');
|
||||
logReader.addLine('The Dart VM service is listening on http://127.0.0.1:3333');
|
||||
final Uri uri = (await uriFuture)!;
|
||||
expect(uri.port, 3333);
|
||||
expect('$uri', 'http://127.0.0.1:3333');
|
||||
});
|
||||
|
||||
testWithoutContext('discovers uri with Ascii Esc code', () async {
|
||||
logReader.addLine('Observatory listening on http://127.0.0.1:3333\x1b[');
|
||||
logReader.addLine('The Dart VM service is listening on http://127.0.0.1:3333\x1b[');
|
||||
final Uri uri = (await discoverer.uri)!;
|
||||
expect(uri.port, 3333);
|
||||
expect('$uri', 'http://127.0.0.1:3333');
|
||||
});
|
||||
|
||||
testWithoutContext('uri throws if logs produce bad line', () async {
|
||||
logReader.addLine('Observatory listening on http://127.0.0.1:apple');
|
||||
logReader.addLine('The Dart VM service is listening on http://127.0.0.1:apple');
|
||||
expect(discoverer.uri, throwsA(isFormatException));
|
||||
});
|
||||
|
||||
@@ -116,7 +116,7 @@ void main() {
|
||||
});
|
||||
|
||||
testWithoutContext('discovers uri if log line contains Android prefix', () async {
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:52584');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:52584');
|
||||
final Uri uri = (await discoverer.uri)!;
|
||||
expect(uri.port, 52584);
|
||||
expect('$uri', 'http://127.0.0.1:52584');
|
||||
@@ -124,7 +124,7 @@ void main() {
|
||||
|
||||
testWithoutContext('discovers uri if log line contains auth key', () async {
|
||||
final Future<Uri?> uriFuture = discoverer.uri;
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
final Uri uri = (await uriFuture)!;
|
||||
expect(uri.port, 54804);
|
||||
expect('$uri', 'http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
@@ -132,7 +132,7 @@ void main() {
|
||||
|
||||
testWithoutContext('discovers uri if log line contains non-localhost', () async {
|
||||
final Future<Uri?> uriFuture = discoverer.uri;
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
final Uri uri = (await uriFuture)!;
|
||||
expect(uri.port, 54804);
|
||||
expect('$uri', 'http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
@@ -147,8 +147,8 @@ void main() {
|
||||
logger: BufferLogger.test(),
|
||||
);
|
||||
final Future<Uri?> uriFuture = discoverer.uri;
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
final Uri uri = (await uriFuture)!;
|
||||
expect(uri.port, 12346);
|
||||
expect('$uri', 'http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
@@ -163,16 +163,16 @@ void main() {
|
||||
logger: BufferLogger.test(),
|
||||
);
|
||||
final Future<Uri?> uriFuture = discoverer.uri;
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
final Uri uri = (await uriFuture)!;
|
||||
expect(uri.port, 12346);
|
||||
expect('$uri', 'http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
});
|
||||
|
||||
testWithoutContext('first uri in the stream is the last one from the log', () async {
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
final Uri uri = await discoverer.uris.first;
|
||||
expect(uri.port, 12345);
|
||||
expect('$uri', 'http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
@@ -186,9 +186,9 @@ void main() {
|
||||
throttleDuration: const Duration(milliseconds: 200),
|
||||
logger: BufferLogger.test(),
|
||||
);
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12344/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12344/PTwjm8Ii8qg=/');
|
||||
final Uri uri = await discoverer.uris.first;
|
||||
expect(uri.port, 12345);
|
||||
expect('$uri', 'http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
@@ -203,8 +203,8 @@ void main() {
|
||||
logger: BufferLogger.test(),
|
||||
);
|
||||
final Future<List<Uri>> results = discoverer.uris.toList();
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
await logReader.dispose();
|
||||
|
||||
// Give time for throttle to finish.
|
||||
@@ -228,13 +228,13 @@ void main() {
|
||||
discoveredUris.add(uri);
|
||||
});
|
||||
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
|
||||
time.elapse(kThrottleDuration);
|
||||
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12344/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12343/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12344/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12343/PTwjm8Ii8qg=/');
|
||||
|
||||
time.elapse(kThrottleDuration);
|
||||
|
||||
@@ -263,13 +263,13 @@ void main() {
|
||||
discoveredUris.add(uri);
|
||||
});
|
||||
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12346/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12345/PTwjm8Ii8qg=/');
|
||||
|
||||
time.elapse(kThrottleTimeInMilliseconds);
|
||||
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12345/PTwjm8Ii8qc=/');
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:12344/PTwjm8Ii8qf=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12345/PTwjm8Ii8qc=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:12344/PTwjm8Ii8qf=/');
|
||||
|
||||
time.elapse(kThrottleTimeInMilliseconds);
|
||||
|
||||
@@ -294,7 +294,7 @@ void main() {
|
||||
|
||||
// Get next port future.
|
||||
final Future<Uri?> nextUri = discoverer.uri;
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
final Uri uri = (await nextUri)!;
|
||||
expect(uri.port, 99);
|
||||
expect('$uri', 'http://127.0.0.1:99/PTwjm8Ii8qg=/');
|
||||
@@ -315,7 +315,7 @@ void main() {
|
||||
|
||||
// Get next port future.
|
||||
final Future<Uri?> nextUri = discoverer.uri;
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
final Uri uri = (await nextUri)!;
|
||||
expect(uri.port, 1243);
|
||||
expect('$uri', 'http://127.0.0.1:1243/PTwjm8Ii8qg=/');
|
||||
@@ -336,7 +336,7 @@ void main() {
|
||||
|
||||
// Get next port future.
|
||||
final Future<Uri?> nextUri = discoverer.uri;
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
final Uri uri = (await nextUri)!;
|
||||
expect(uri.port, 99);
|
||||
expect('$uri', 'http://127.0.0.1:99/PTwjm8Ii8qg=/');
|
||||
@@ -357,7 +357,7 @@ void main() {
|
||||
|
||||
// Get next port future.
|
||||
final Future<Uri?> nextUri = discoverer.uri;
|
||||
logReader.addLine('I/flutter : Observatory listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://127.0.0.1:54804/PTwjm8Ii8qg=/');
|
||||
final Uri uri = (await nextUri)!;
|
||||
expect(uri.port, 54777);
|
||||
expect('$uri', 'http://[::1]:54777/PTwjm8Ii8qg=/');
|
||||
@@ -378,7 +378,7 @@ void main() {
|
||||
|
||||
// Get next port future.
|
||||
final Future<Uri?> nextUri = discoverer.uri;
|
||||
logReader.addLine('I/flutter : Observatory listening on http://[::1]:54777/PTwjm8Ii8qg=/\x1b[');
|
||||
logReader.addLine('I/flutter : The Dart VM service is listening on http://[::1]:54777/PTwjm8Ii8qg=/\x1b[');
|
||||
final Uri uri = (await nextUri)!;
|
||||
expect(uri.port, 54777);
|
||||
expect('$uri', 'http://[::1]:54777/PTwjm8Ii8qg=/');
|
||||
|
||||
@@ -154,7 +154,7 @@ void main() {
|
||||
completer: completer,
|
||||
stdout:
|
||||
'''
|
||||
Observatory listening on $observatoryUri
|
||||
The Dart VM service is listening on $observatoryUri
|
||||
Hello!
|
||||
''',
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user