| Index: pkg/http_server/test/http_body_test.dart
|
| diff --git a/pkg/http_server/test/http_body_test.dart b/pkg/http_server/test/http_body_test.dart
|
| index bae4e1bf980340b5b9cfefb03a48c93a4a7782e6..e8d84c089332e5aeb09a07160f4bcf55d3b16f6e 100644
|
| --- a/pkg/http_server/test/http_body_test.dart
|
| +++ b/pkg/http_server/test/http_body_test.dart
|
| @@ -90,6 +90,7 @@ void testHttpServerRequestBody() {
|
| HttpServer.bind("127.0.0.1", 0).then((server) {
|
| server.transform(new HttpBodyHandler(defaultEncoding: defaultEncoding))
|
| .listen((body) {
|
| + if (shouldFail) return;
|
| expect(shouldFail, isFalse);
|
| expect(body.type, equals(type));
|
| switch (type) {
|
| @@ -157,9 +158,12 @@ void testHttpServerRequestBody() {
|
| }
|
| return response.drain();
|
| })
|
| - .then((_) {
|
| + .whenComplete(() {
|
| client.close();
|
| server.close();
|
| + })
|
| + .catchError((e) {
|
| + if (!shouldFail) throw e;
|
| });
|
| });
|
| }
|
|
|