Skip to content

Commit 7446307

Browse files
Moved KeepAliveThread State check after authentication to avoid test timing issues
1 parent ea3af06 commit 7446307

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/com/hierynomus/sshj/keepalive/KeepAliveThreadTerminationTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ public void shouldStartThreadOnConnectAndInterruptOnDisconnect() throws IOExcept
5959
assertEquals(Thread.State.NEW, keepAlive.getState());
6060

6161
fixture.connectClient(sshClient);
62-
assertEquals(Thread.State.TIMED_WAITING, keepAlive.getState());
6362

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

65+
assertEquals(Thread.State.TIMED_WAITING, keepAlive.getState());
66+
6667
fixture.stopClient();
6768
Thread.sleep(STOP_SLEEP);
6869

0 commit comments

Comments
 (0)