We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The test fails on Windows, seemingly due to a race between client attempting to close the connection and server done its part closing.
Following fixes the test:
diff --git a/LibTest/io/WebSocket/closeCode_A01_t02.dart b/LibTest/io/WebSocket/closeCode_A01_t02.dart index 85ef48c6a2..31f0b4d03c 100644 --- a/LibTest/io/WebSocket/closeCode_A01_t02.dart +++ b/LibTest/io/WebSocket/closeCode_A01_t02.dart @@ -10,23 +10,27 @@ /// closed. /// @author ngl@unipro.ru +import "dart:async"; import "dart:io"; import "../../../Utils/expect.dart"; main() { + final serverIsClosed = Completer<bool>(); HttpServer.bind("127.0.0.1", 0).then((server) { server.listen((request) { WebSocketTransformer .upgrade(request) .then((websocket) { - websocket.close(WebSocketStatus.normalClosure); + websocket.close(WebSocketStatus.normalClosure).then((_) { + serverIsClosed.complete(true); + }); }); }); var webs = WebSocket.connect("ws://127.0.0.1:${server.port}/"); webs.then((client) async { Expect.isNull(client.closeCode); - await server.close(); + server.close(); + await serverIsClosed.future; client.close().then((_) { Expect.equals(WebSocketStatus.normalClosure, client.closeCode); });
The text was updated successfully, but these errors were encountered:
With the fix applied the test is still racy. I'll dig into it
Sorry, something went wrong.
Fixes dart-lang#2268. Fix LibTest/io/WebSocket/closeCode_A01_t02.dart…
79b430a
… to be not racy
dc7dd6a
[co19] Roll co19 to 9d347fdf209cc343ca7fdf94a40deea88fa28896
bb28597
2023-10-13 sgrekhov22@gmail.com Fixes dart-lang/co19#2310. Fix new roll failures (dart-lang/co19#2311) 2023-10-13 sgrekhov22@gmail.com Fixes dart-lang/co19#2306. Fix promoted instance type in not_promotable_A01_t04.dart (dart-lang/co19#2309) 2023-10-13 sgrekhov22@gmail.com Fixes dart-lang/co19#2307. Don't expect private fields promotion on static fields (dart-lang/co19#2308) 2023-10-11 sgrekhov22@gmail.com dart-lang/co19#2291. Update `Link.create()` tests according to the documentation (dart-lang/co19#2299) 2023-10-11 sgrekhov22@gmail.com dart-lang/co19#2275. Add `noSuchMethod` tests. Part 3 (dart-lang/co19#2294) 2023-10-10 sgrekhov22@gmail.com dart-lang/co19#2275. Add `noSuchMethod` tests. Part 4 (dynamic semantics) (dart-lang/co19#2296) 2023-10-10 sgrekhov22@gmail.com dart-lang/co19#2291. Update `Link.create()` according to the documentation. Part 2 (dart-lang/co19#2301) 2023-10-10 sgrekhov22@gmail.com Fixes dart-lang/co19#2268. Fix LibTest/io/WebSocket/closeCode_A01_t02.dart to be not racy (dart-lang/co19#2302) 2023-10-09 sgrekhov22@gmail.com dart-lang/co19#1400. Add more tests for private fields promotion of extension types (dart-lang/co19#2300) Change-Id: Ib34f392c8a2a0aaab8b7b0cb028f918ab2a3249f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330460 Commit-Queue: Alexander Thomas <athom@google.com> Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Alexander Thomas <athom@google.com>
sgrekhov
No branches or pull requests
The test fails on Windows, seemingly due to a race between client attempting to close the connection and server done its part closing.
Following fixes the test:
The text was updated successfully, but these errors were encountered: