| Index: pkg/scheduled_test/test/substitute_future_test.dart
|
| diff --git a/pkg/scheduled_test/test/substitute_future_test.dart b/pkg/scheduled_test/test/substitute_future_test.dart
|
| index 5cffb4b6b62ee494a1071529b935ee6d08898573..b3cade8c434c23d8e78b2d2f4d887b59d1df9c60 100644
|
| --- a/pkg/scheduled_test/test/substitute_future_test.dart
|
| +++ b/pkg/scheduled_test/test/substitute_future_test.dart
|
| @@ -148,9 +148,9 @@ void main() {
|
| var completer = new Completer();
|
| var future = new SubstituteFuture(completer.future);
|
| completer.complete('success');
|
| - future.then(expectAsync1((_) {
|
| - expect(() => future.substitute(new Future.value()),
|
| - throwsStateError);
|
| - }));
|
| + // The completer finishes asynchronously. So we have to wait for it to
|
| + // be completed before we can substitute.
|
| + expect(future.then((_) => future.substitute(new Future.value())),
|
| + throwsStateError);
|
| });
|
| }
|
|
|