Index: pkg/scheduled_test/lib/src/scheduled_server/handler.dart |
diff --git a/pkg/scheduled_test/lib/src/scheduled_server/handler.dart b/pkg/scheduled_test/lib/src/scheduled_server/handler.dart |
index 6be6b1c2112970ad695db8fc9c66d038146a1e11..4d6c6b8a4c70fcd6ffb4d94cb18a994820c95f25 100644 |
--- a/pkg/scheduled_test/lib/src/scheduled_server/handler.dart |
+++ b/pkg/scheduled_test/lib/src/scheduled_server/handler.dart |
@@ -54,7 +54,7 @@ class Handler { |
// between a test failing while waiting for a handler and a test failing |
// while executing a handler. |
chainToCompleter(schedule(() { |
- return new Future.of(() { |
+ return new Future.sync(() { |
if (request.method != method || request.uri.path != path) { |
throw "'${server.description}' expected $method $path, " |
"but got ${request.method} ${request.uri.path}."; |