Skip to content

Commit

Permalink
Moved KeepAliveThread State check after authentication to avoid test …
Browse files Browse the repository at this point in the history
…timing issues
  • Loading branch information
exceptionfactory committed Sep 16, 2022
1 parent ea3af06 commit 7446307
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ public void shouldStartThreadOnConnectAndInterruptOnDisconnect() throws IOExcept
assertEquals(Thread.State.NEW, keepAlive.getState());

fixture.connectClient(sshClient);
assertEquals(Thread.State.TIMED_WAITING, keepAlive.getState());

assertThrows(UserAuthException.class, () -> sshClient.authPassword("bad", "credentials"));

assertEquals(Thread.State.TIMED_WAITING, keepAlive.getState());

fixture.stopClient();
Thread.sleep(STOP_SLEEP);

Expand Down

0 comments on commit 7446307

Please sign in to comment.