0ed7f7bb4d
Bug: #51401 TEST=ci Change-Id: If64853565aca66105da43609fa8bea70ea65a7ee Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283020 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com>
21 lines
795 B
Dart
21 lines
795 B
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.
|
|
//
|
|
// This test verifies that concurrent requests to start service server still
|
|
// result only in one server being brought up.
|
|
|
|
import 'dart:async';
|
|
import 'dart:developer';
|
|
|
|
main() async {
|
|
for (int i = 0; i < 32; i++) {
|
|
Service.controlWebServer(enable: true, silenceOutput: true);
|
|
}
|
|
// Give some time for control messages to arrive to vmservice isolate.
|
|
await Future.delayed(Duration(seconds: 2));
|
|
// If the program doesn't hang on shutdown, the test passes.
|
|
// Program hanging means that more than one http server was launched,
|
|
// but only one gets closed.
|
|
}
|