| Index: sdk/lib/_internal/pub/test/serve/utils.dart
|
| diff --git a/sdk/lib/_internal/pub/test/serve/utils.dart b/sdk/lib/_internal/pub/test/serve/utils.dart
|
| index c9ea71e9876d6aad9e96627fd19ebfea8a68bb6a..a830da4eea2619a9a6f2bbb1b7b168dc3983c0c5 100644
|
| --- a/sdk/lib/_internal/pub/test/serve/utils.dart
|
| +++ b/sdk/lib/_internal/pub/test/serve/utils.dart
|
| @@ -239,6 +239,17 @@ void postShould405(String urlPath, {String root}) {
|
| }, "request $urlPath");
|
| }
|
|
|
| +/// Schedules an HTTP request to the (theoretically) running pub server with
|
| +/// [urlPath] and verifies that it cannot be connected to.
|
| +///
|
| +/// [root] indicates which server should be accessed, and defaults to "web".
|
| +void requestShouldNotConnect(String urlPath, {String root}) {
|
| + schedule(() {
|
| + return expect(http.get(_getServerUrlSync(root, urlPath)),
|
| + throwsA(new isInstanceOf<SocketException>()));
|
| + }, "request $urlPath");
|
| +}
|
| +
|
| /// Reads lines from pub serve's stdout until it prints the build success
|
| /// message.
|
| ///
|
|
|