mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:49:47 +00:00
eff8c305d9
TEST=pkg/vm_service/test_timeline_default_streams_test.dart Fixes https://github.com/flutter/devtools/issues/3444 Change-Id: I3f772a54a512eb836e3e7279ee8d4d3437473393 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255181 Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
33 lines
1.1 KiB
Dart
33 lines
1.1 KiB
Dart
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// VMOptions=--observe --no-pause-isolates-on-exit
|
|
|
|
import 'dart:developer';
|
|
|
|
import 'package:test/test.dart';
|
|
import 'package:vm_service/vm_service.dart';
|
|
import 'package:vm_service/vm_service_io.dart';
|
|
|
|
main() {
|
|
late VmService service;
|
|
setUp(() async {
|
|
ServiceProtocolInfo serviceInfo = await Service.getInfo();
|
|
// Wait for VM service to publish its connection info.
|
|
while (serviceInfo.serverUri == null) {
|
|
await Future.delayed(Duration(milliseconds: 10));
|
|
serviceInfo = await Service.getInfo();
|
|
}
|
|
service =
|
|
await vmServiceConnectUri(serviceInfo.serverWebSocketUri!.toString());
|
|
});
|
|
|
|
tearDown(() => service.dispose());
|
|
|
|
test('Check default timeline streams set by --observe', () async {
|
|
final flags = await service.getVMTimelineFlags();
|
|
expect(flags.recordedStreams, containsAll(['Compiler', 'Dart', 'GC']));
|
|
});
|
|
}
|