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

Unified Diff: pkg/scheduled_test/lib/src/schedule_error.dart

Issue 12226103: Revert "Add built-in timeouts to scheduled_test." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/lib/src/schedule.dart ('k') | pkg/scheduled_test/lib/src/substitute_future.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/src/schedule_error.dart
diff --git a/pkg/scheduled_test/lib/src/schedule_error.dart b/pkg/scheduled_test/lib/src/schedule_error.dart
index 544a111db8ad88b72e0bb29a780d579d81befa71..ce1f344946493dfeea69afede3dc462126b6f815 100644
--- a/pkg/scheduled_test/lib/src/schedule_error.dart
+++ b/pkg/scheduled_test/lib/src/schedule_error.dart
@@ -19,8 +19,9 @@ class ScheduleError extends AsyncError {
/// there was no such task.
final Task task;
- /// The state of the schedule at the time the error was detected.
- final ScheduleState _stateWhenDetected;
+ /// Whether the schedule was finished executing at the time the error was
+ /// detected.
+ final bool _scheduleWasDone;
/// Creates a new [ScheduleError] wrapping [error]. The metadata in
/// [AsyncError]s and [ScheduleError]s will be preserved.
@@ -46,7 +47,7 @@ class ScheduleError extends AsyncError {
this.task)
: super.withCause(error, stackTrace, cause),
this.schedule = schedule,
- this._stateWhenDetected = schedule.state;
+ this._scheduleWasDone = schedule.done;
String toString() {
var result = new StringBuffer();
@@ -67,9 +68,9 @@ class ScheduleError extends AsyncError {
if (task != null) {
result.add('Error detected during task in queue "${task.queue}":\n');
result.add(task.generateTree());
- } else if (_stateWhenDetected == ScheduleState.DONE) {
+ } else if (_scheduleWasDone) {
result.add('Error detected after all tasks in the queue had finished.');
- } else { // _stateWhenDetected == ScheduleState.SET_UP
+ } else {
result.add('Error detected before the schedule started running.');
}
« no previous file with comments | « pkg/scheduled_test/lib/src/schedule.dart ('k') | pkg/scheduled_test/lib/src/substitute_future.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698