mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
[tests] delete html/async_test.
This test was written to validate correctness of the web implementation of `dart:isolates`, back when it was supported. Today, this API is unsupported in both dart2js and DDC. The test was consistently failing in DDC and skipped in dart2js. We don't believe it's valuable to continue running this test at this moment. Change-Id: I578533b09c4172daf3f49fcc528ccb2cebebb53d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347642 Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
parent
3545ce4966
commit
05a53dae0d
|
@ -1,35 +0,0 @@
|
|||
// 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.
|
||||
|
||||
library async_cancellingisolate;
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:expect/minitest.dart';
|
||||
|
||||
main(message, replyTo) {
|
||||
var command = message.first;
|
||||
expect(command, 'START');
|
||||
var shot = false;
|
||||
var oneshot;
|
||||
var periodic;
|
||||
periodic = new Timer.periodic(const Duration(milliseconds: 10), (timer) {
|
||||
expect(shot, isFalse);
|
||||
shot = true;
|
||||
expect(timer, same(periodic));
|
||||
periodic.cancel();
|
||||
oneshot.cancel();
|
||||
// Wait some more time to be sure callbacks won't be invoked any
|
||||
// more.
|
||||
new Timer(const Duration(milliseconds: 50), () {
|
||||
replyTo.send('DONE');
|
||||
});
|
||||
});
|
||||
// We launch the oneshot timer after the periodic timer. Otherwise a
|
||||
// (very long) context switch could make this test flaky: assume the
|
||||
// oneshot timer is created first and then there is a 30ms context switch.
|
||||
// when the periodic timer is scheduled it would execute after the oneshot.
|
||||
oneshot = new Timer(const Duration(milliseconds: 30), () {
|
||||
fail('Should never be invoked');
|
||||
});
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
// 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:expect/minitest.dart';
|
||||
|
||||
main(message, replyTo) {
|
||||
var command = message.first;
|
||||
expect(command, 'START');
|
||||
new Timer(const Duration(milliseconds: 10), () {
|
||||
replyTo.send('DONE');
|
||||
});
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
// 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.
|
||||
|
||||
library async_periodictimer;
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:expect/minitest.dart';
|
||||
|
||||
main(message, replyTo) {
|
||||
var command = message.first;
|
||||
expect(command, 'START');
|
||||
int counter = 0;
|
||||
new Timer.periodic(const Duration(milliseconds: 10), (timer) {
|
||||
if (counter == 3) {
|
||||
counter = 1024;
|
||||
timer.cancel();
|
||||
// Wait some more time to be sure callback won't be invoked any
|
||||
// more.
|
||||
new Timer(const Duration(milliseconds: 30), () {
|
||||
replyTo.send('DONE');
|
||||
});
|
||||
return;
|
||||
}
|
||||
assert(counter < 3);
|
||||
counter++;
|
||||
});
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
// 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.
|
||||
|
||||
library async_test;
|
||||
|
||||
import 'package:async_helper/async_minitest.dart';
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:isolate';
|
||||
import 'dart:html';
|
||||
|
||||
import 'async_oneshot.dart' as oneshot_test show main;
|
||||
import 'async_periodictimer.dart' as periodictimer_test show main;
|
||||
import 'async_cancellingisolate.dart' as cancelling_test show main;
|
||||
|
||||
oneshot(message) => oneshot_test.main(message.first, message.last);
|
||||
periodicTimerIsolate(message) =>
|
||||
periodictimer_test.main(message.first, message.last);
|
||||
cancellingIsolate(message) => cancelling_test.main(message.first, message.last);
|
||||
|
||||
main() {
|
||||
test('one shot timer in pure isolate', () {
|
||||
var response = new ReceivePort();
|
||||
var remote = Isolate.spawn(oneshot, [
|
||||
['START'],
|
||||
response.sendPort
|
||||
]);
|
||||
expect(remote.then((_) => response.first), completion('DONE'));
|
||||
});
|
||||
|
||||
test('periodic timer in pure isolate', () {
|
||||
var response = new ReceivePort();
|
||||
var remote = Isolate.spawn(periodicTimerIsolate, [
|
||||
['START'],
|
||||
response.sendPort
|
||||
]);
|
||||
expect(remote.then((_) => response.first), completion('DONE'));
|
||||
});
|
||||
|
||||
test('cancellation in pure isolate', () {
|
||||
var response = new ReceivePort();
|
||||
var remote = Isolate.spawn(cancellingIsolate, [
|
||||
['START'],
|
||||
response.sendPort
|
||||
]);
|
||||
expect(remote.then((_) => response.first), completion('DONE'));
|
||||
});
|
||||
}
|
|
@ -7,7 +7,6 @@ convert/chunked_conversion_utf88_test: Slow, Pass
|
|||
convert/utf85_test: Slow, Pass
|
||||
developer/metrics_num_test: Skip # Because of an int / double type test.
|
||||
developer/timeline_test: Skip # Not supported
|
||||
html/async_test: SkipByDesign
|
||||
html/custom/document_register_basic_test: Slow, Pass
|
||||
html/custom/document_register_type_extensions_test/construction: Slow, Pass
|
||||
html/custom/document_register_type_extensions_test/registration: Slow, Pass
|
||||
|
|
Loading…
Reference in a new issue