| Index: sdk/lib/_internal/pub/test/serve/web_socket/serve_directory_and_immediately_unserve_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/serve/web_socket/serve_directory_and_immediately_unserve_test.dart b/sdk/lib/_internal/pub/test/serve/web_socket/serve_directory_and_immediately_unserve_test.dart
|
| index 1d459cf9c21bfc7f6a1590025cdfde435d8cb025..d8f60e4a23ccd890ab16f052b51ae32ddb0f4606 100644
|
| --- a/sdk/lib/_internal/pub/test/serve/web_socket/serve_directory_and_immediately_unserve_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/serve/web_socket/serve_directory_and_immediately_unserve_test.dart
|
| @@ -28,11 +28,14 @@ main() {
|
|
|
| pubServe(args: ["web"]);
|
|
|
| + // We call [webSocketRequest] outside of the [schedule] call below because
|
| + // we need it to schedule the sending of the request to guarantee that the
|
| + // serve is sent before the unserve.
|
| + var serveRequest = webSocketRequest("serveDirectory", {"path": "test"});
|
| + var unserveRequest = webSocketRequest("unserveDirectory", {"path": "test"});
|
| +
|
| schedule(() {
|
| - return Future.wait([
|
| - webSocketRequest("serveDirectory", {"path": "test"}),
|
| - webSocketRequest("unserveDirectory", {"path": "test"})
|
| - ]).then((results) {
|
| + return Future.wait([serveRequest, unserveRequest]).then((results) {
|
| expect(results[0], contains("result"));
|
| expect(results[1], contains("result"));
|
| // These results should be equal since "serveDirectory" returns the URL
|
|
|