Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ public void testAppHandleDisconnect() throws Exception {
Socket s = new Socket(InetAddress.getLoopbackAddress(), server.getPort());
client = new TestClient(s);
client.send(new Hello(secret, "1.4.0"));
client.send(new SetAppId("someId"));

// Wait until we know the server has received the messages and matched the handle to the
// connection before disconnecting.
eventually(Duration.ofSeconds(1), Duration.ofMillis(10), () -> {
assertEquals("someId", handle.getAppId());
});

handle.disconnect();
waitForError(client, secret);
} finally {
Expand Down