Message-ID: From: "harudini (@harudini)" To: "pgjdbc/pgjdbc" Date: Wed, 22 Apr 2026 08:20:47 +0000 Subject: [pgjdbc/pgjdbc] issue #4037: StatementTest fails with JDK 8 List-Id: X-GitHub-Author-Id: 46880386 X-GitHub-Author-Login: harudini X-GitHub-Issue: 4037 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: closed X-GitHub-Type: issue X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/4037 Content-Type: text/plain; charset=utf-8 **Describe the issue** Running the test suite with JDK 8 fails, while it succeeds on JDK 11 and later. The failure appears during execution of StatementTest, eventually resulting in an OutOfMemoryError. This issue started after the following commit (https://github.com/pgjdbc/pgjdbc/commit/bdd930bf458e3d490d93edc4dc24a67e3a2d5964). **Driver Version?** **Java Version?** OpenJDK 8 **OS Version?** RHEL8 **PostgreSQL Version?** 18.3 **To Reproduce** `./gradlew -PjdkBuildVersion=17 -PjdkTestVersion=8 test` **Expected behaviour** All test to pass. **Logs** ``` StatementTest > fastCloses() STANDARD_OUT [testFastCloses] total counts for each sql state: {0=102, 55000=898} 2.4sec, org.postgresql.test.jdbc2.StatementTest > cancelQueryWithBrokenNetwork() FAILURE 0.0sec, UnknownClass > executionError org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to execute tests Caused by: org.junit.platform.commons.JUnitException: Error executing tests for engine junit-jupiter Caused by: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006) Caused by: java.lang.OutOfMemoryError at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:598) at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1005) Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded at org.postgresql.test.jdbc2.StatementTest.sideStatementFinalizers(StatementTest.java:1076 ```