Skip to content

Commit

Permalink
Fixed flaky RealWebSocketTest.serverCloseThenClientClose(). (square#5800
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-r12 authored Feb 23, 2020
1 parent 8e1f628 commit 2873719
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,15 @@ public final class RealWebSocketTest {

@Test public void serverCloseThenClientClose() throws IOException {
server.webSocket.close(1000, "Hello!");

client.processNextFrame();
client.listener.assertClosing(1000, "Hello!");
assertThat(client.webSocket.close(1000, "Bye!")).isTrue();
client.listener.assertClosed(1000, "Hello!");

server.processNextFrame();
server.listener.assertClosing(1000, "Bye!");
server.listener.assertClosed(1000, "Bye!");
}

@Test public void emptyCloseInitiatesShutdown() throws IOException {
Expand Down

0 comments on commit 2873719

Please sign in to comment.