blob: ba4faa453c4681060b4ed505f937e0cce491dc62 [file] [log] [blame]
// Copyright (c) 2020, 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.
import 'dart:async';
import 'package:observatory_2/service_io.dart';
import 'package:test/test.dart';
import 'client_resume_approvals_common.dart';
import 'service_test_common.dart';
import 'test_helper.dart';
void fooBar() {
int i = 0;
print(i);
}
WebSocketVM client1;
WebSocketVM client2;
final sameClientNamesTest = <IsolateTest>[
// Multiple clients, same client names.
(Isolate isolate) async {
final resumeFuture = waitForResume(isolate);
client1 = await createClient(isolate.owner);
await setRequireApprovalForResume(
client1,
isolate,
pauseOnStart: true,
pauseOnExit: true,
);
client2 = await createClient(isolate.owner);
expect(await isPausedAtStart(isolate), true);
await resume(client2, isolate);
await resumeFuture;
},
hasStoppedAtExit,
];
Future<void> main(args) => runIsolateTests(
args,
sameClientNamesTest,
testeeConcurrent: fooBar,
pause_on_start: true,
pause_on_exit: true,
enableService: false,
);