Skip to content

Commit 65e4912

Browse files
committed
fix(test): use Java 8 try-with-resources in QuestDBServerRecoveryTest
try (server) on an effectively-final existing variable is Java 9+ syntax (JEP 213) and fails the JDK 8 test-compile (the source-of-truth target) with -source 1.8, breaking the build-jdk8 CI job and the release build before any test runs. Inline the resource construction into the try-with-resources declaration, which is valid on Java 8 and keeps the server variable name used throughout the body.
1 parent 1245c17 commit 65e4912

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

core/src/test/java/io/questdb/client/test/QuestDBServerRecoveryTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ public void testFacadeStartsWhileServerDownThenWritesAndReaderConnectsOnRecovery
5252
// completes, so the server is effectively "down". It serves ingest ACK
5353
// on the write path and a SERVER_INFO frame on the read path -- the read
5454
// path is gated so the ingest connection's ACK stream is never disturbed.
55-
TestWebSocketServer server = new TestWebSocketServer(new TestWebSocketServer.WebSocketServerHandler() {
56-
});
57-
try (server) {
55+
try (TestWebSocketServer server = new TestWebSocketServer(new TestWebSocketServer.WebSocketServerHandler() {
56+
})) {
5857
server.setSendServerInfo(true); // the egress client's connect() waits for SERVER_INFO
5958
// One cluster config drives both pools:
6059
// lazy_connect=true expands to exactly this resilience: the ingest

0 commit comments

Comments
 (0)