Skip to content

Commit c03a28c

Browse files
Add test for auth violations during reconnect
Introduce a new test case to reproduce issue #1320, focusing on handling authorization violations during reconnections. It also makes the `closeSocketLock` in `NatsConnection` package-private to facilitate testing.
1 parent 38ed437 commit c03a28c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/java/io/nats/client/impl/AuthViolationDuringReconnect.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ private static Runnable waitCloseSocket(NatsConnection nc) {
6666

6767
private static void restartServer(AtomicReference<NatsTestServer> ts, int port) {
6868
try {
69+
System.out.println("Restarting server");
6970
ts.get().shutdown();
7071
ts.set(new NatsTestServer(new String[]{"--auth", "1234", "-m", "8222"}, port, false));
7172
} catch (Exception e) {

0 commit comments

Comments
 (0)