Index: pkg/scheduled_test/test/scheduled_server_test.dart |
diff --git a/pkg/scheduled_test/test/scheduled_server_test.dart b/pkg/scheduled_test/test/scheduled_server_test.dart |
index 5fc78120a3866f592ca33b2f4bb61d4d88370936..cc367730e1f3e23ec46928df118a5cfb95c9299e 100644 |
--- a/pkg/scheduled_test/test/scheduled_server_test.dart |
+++ b/pkg/scheduled_test/test/scheduled_server_test.dart |
@@ -35,10 +35,18 @@ void main() { |
test('test 2', () { |
expect(errors, everyElement(new isInstanceOf<ScheduleError>())); |
- expect(errors.length, equals(2)); |
+ // TODO(nweiz): There can be three errors due to issue 9151. The |
+ // HttpParserException is reported without a stack trace, and so when it's |
+ // wrapped twice it registers as a different exception each time (because |
+ // it's given an ad-hoc stack trace). Always expect two exceptions when |
+ // issue 9151 is fixed. |
+ expect(errors.length, inInclusiveRange(2, 3)); |
expect(errors[0].error, equals("'scheduled server 0' received GET /hello " |
"when no more requests were expected.")); |
expect(errors[1].error, new isInstanceOf<HttpParserException>()); |
+ if (errors[2] != null) { |
+ expect(errors[2].error, new isInstanceOf<HttpParserException>()); |
+ } |
}); |
}, passing: ['test 2']); |