Skip to content
Permalink
Browse files

test: skip ConcurrentStatementFetch for PostgreSQL < 8.4 (#884)

PostgreSQL 8.2 is known to close named portals unexpectedly, so we just ignore the test.
The following scenario might be affected: old backend version + setFetchSize + interleaved ResultSet processing

This is a follow-up for #870 and #869 for PostgreSQL < 8.4
  • Loading branch information
vlsi committed Jul 24, 2017
1 parent f0deabf commit 5334cb6ef7554bba255f00baf4ff3220f16e31ea
Showing with 8 additions and 0 deletions.
  1. +3 −0 README.md
  2. +5 −0 pgjdbc/src/test/java/org/postgresql/test/jdbc2/ConcurrentStatementFetch.java
@@ -74,6 +74,9 @@ There are also available (snapshot) binary RPMs in [Fedora's Copr repository](ht
## Changelog
Notable changes for:

**NEXT**:
* Statements with non-zero fetchSize no longer require server-side named handle. This might cause issues when using old PostgreSQL versions (pre-8.4)+fetchSize+interleaved ResultSet processing combo. see [issue 869](https://github.com/pgjdbc/pgjdbc/issues/869)

**[42.1.3]** (2017-07-14):
* fixed NPE in PreparedStatement.executeBatch in case of empty batch (regression since 42.1.2) PR#867

@@ -5,9 +5,11 @@

package org.postgresql.test.jdbc2;

import org.postgresql.core.ServerVersion;
import org.postgresql.test.TestUtil;

import org.junit.Assert;
import org.junit.Assume;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -50,6 +52,9 @@ public void setUp() throws Exception {

@Test
public void testFetchTwoStatements() throws Exception {
// This test definitely fails at 8.2 in autocommit=false, and works with 8.4+
Assume.assumeTrue(autoCommit == AutoCommit.YES
|| TestUtil.haveMinimumServerVersion(con, ServerVersion.v8_4));
PreparedStatement ps1 = null;
PreparedStatement ps2 = null;
try {

0 comments on commit 5334cb6

Please sign in to comment.
You can’t perform that action at this time.