Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Disable no-arg callable statement tests in simple query mode #2419

Merged
merged 1 commit into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions pgjdbc/src/test/java/org/postgresql/test/jdbc2/BaseTest4.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ public void assumeBinaryModeForce() {
Assume.assumeTrue(preferQueryMode != PreferQueryMode.SIMPLE);
}

public void assumeNotSimpleQueryMode() {
Assume.assumeTrue(preferQueryMode != PreferQueryMode.SIMPLE);
}

/**
* Shorthand for {@code Assume.assumeTrue(TestUtil.haveMinimumServerVersion(conn, version)}.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ public void testSetObjectBit() throws Throwable {

@Test
public void testGetBit1WithoutArg() throws SQLException {
assumeNotSimpleQueryMode();
try (CallableStatement call = con.prepareCall("{ ? = call testspg__getBit1WithoutArg () }")) {
call.registerOutParameter(1, Types.BOOLEAN);
call.execute();
Expand All @@ -404,6 +405,7 @@ public void testGetBit1WithoutArg() throws SQLException {

@Test
public void testGetBit2WithoutArg() throws SQLException {
assumeNotSimpleQueryMode();
try (CallableStatement call = con.prepareCall("{ ? = call testspg__getBit2WithoutArg () }")) {
call.registerOutParameter(1, Types.BOOLEAN);
try {
Expand Down Expand Up @@ -980,6 +982,7 @@ public void testGetBoolean01() throws Throwable {

@Test
public void testGetBooleanWithoutArg() throws SQLException {
assumeNotSimpleQueryMode();
try (CallableStatement call = con.prepareCall("{ ? = call testspg__getBooleanWithoutArg () }")) {
call.registerOutParameter(1, Types.BOOLEAN);
call.execute();
Expand Down