Skip to content

Commit 5b1070b

Browse files
mtopolnikclaude
andcommitted
Fix caught exception type in rollback test
flushSync() wraps the NullPointerException from sendBinary() on a null client in a LineSenderException via its catch (Throwable) block. The test was catching the unwrapped NullPointerException, which never arrived, causing the test to fail with an unhandled LineSenderException. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7c7c4a3 commit 5b1070b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

core/src/test/java/io/questdb/client/test/cutlass/qwp/client/QwpDeltaDictRollbackTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
package io.questdb.client.test.cutlass.qwp.client;
2626

27+
import io.questdb.client.cutlass.line.LineSenderException;
2728
import io.questdb.client.cutlass.qwp.client.InFlightWindow;
2829
import io.questdb.client.cutlass.qwp.client.QwpWebSocketSender;
2930
import io.questdb.client.test.AbstractTest;
@@ -65,9 +66,9 @@ public void testSyncFlushFailureDoesNotAdvanceMaxSentSymbolId() throws Exception
6566
// because client is null (we never actually connected)
6667
try {
6768
sender.flush();
68-
Assert.fail("Expected NullPointerException from null client");
69-
} catch (NullPointerException expected) {
70-
// sendBinary() on null client
69+
Assert.fail("Expected LineSenderException from null client");
70+
} catch (LineSenderException expected) {
71+
// sendBinary() on null client, wrapped by flushSync()
7172
}
7273

7374
// The fix: maxSentSymbolId must remain -1 because the send failed.

0 commit comments

Comments
 (0)