Skip to content

Commit

Permalink
Issue #1094: changes from master moved to pre-nnbd branch for LibTest…
Browse files Browse the repository at this point in the history
…s/io/WebSocket/isEmpty_A01_t01.
  • Loading branch information
iarkh committed Aug 9, 2021
1 parent 3f054eb commit b66b0ca
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions LibTest/io/WebSocket/isEmpty_A01_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,21 @@ main() {
WebSocketTransformer
.upgrade(request)
.then((websocket) {
Expect.isTrue(websocket.done is Future<bool>);
Expect.isTrue(websocket.isEmpty is Future<bool>);
websocket.close();
});
});

var webs = WebSocket.connect("ws://127.0.0.1:${server.port}/");
webs.then((client) {
Expect.isTrue(client.done is Future<bool>);
client.close().then((_) {
server.close();
bool called = false;
client.isEmpty.then((value) {
Expect.isTrue(value);
called = true;
});
client.close().then((_) async {
await server.close();
Expect.isTrue(called);
});
});
});
Expand Down

0 comments on commit b66b0ca

Please sign in to comment.