Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart

Issue 227193002: pkg/scheduled_test: handle null currentSchedule due to timeout (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/scheduled_test/test/metatest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart
diff --git a/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart b/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart
index 048745ddbea01962ea143e10181ebf1d7e6832d9..749ec6e5e841330e587fb12e5d4c3de599289581 100644
--- a/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart
+++ b/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart
@@ -2,6 +2,8 @@
// 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:scheduled_test/scheduled_test.dart';
import 'package:scheduled_test/src/mock_clock.dart' as mock_clock;
@@ -13,6 +15,16 @@ void main(_, message) {
setUpTimeout();
+ expectTests('a scheduled test with an out-of-band error should fail', () {
+ test('test 1', () {
+ sleep(5).then((_) => throw 'error');
nweiz 2014/04/10 00:58:15 If you're going to use [sleep] like this, you need
+ });
+
+ test('test 2', () {
+ return sleep(10);
+ });
+ }, {'test 1': ERROR, 'test 2': PASS});
+
expectTestsPass('currentSchedule.errors contains the error in the onComplete '
'queue', () {
var errors;
« no previous file with comments | « pkg/scheduled_test/test/metatest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698