Skip to content

Commit 8c5069c

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 c03a28c commit 8c5069c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private static void restartServer(AtomicReference<NatsTestServer> ts, int port)
7676

7777
private static void subscribe(Dispatcher d) {
7878
latch = new CountDownLatch(1);
79-
for (int i = 0; i < 500_000; i++) {
79+
for (int i = 0; i < 10_000; i++) {
8080
String subject = "test_" + i;
8181
subscriptions.add(subject);
8282
d.subscribe(subject);

0 commit comments

Comments
 (0)