Permalink
Browse files

fix: UUID test for preferQueryMode=simple

  • Loading branch information...
vlsi committed Mar 10, 2018
1 parent 5827858 commit 44bb7f8d66829705bf46a6cfcad8a179eb14e441
Showing with 2 additions and 1 deletion.
  1. +2 −1 pgjdbc/src/test/java/org/postgresql/test/jdbc4/UUIDTest.java
@@ -9,6 +9,7 @@
import static org.junit.Assert.assertTrue;

import org.postgresql.core.ServerVersion;
import org.postgresql.jdbc.PreferQueryMode;
import org.postgresql.test.TestUtil;
import org.postgresql.test.jdbc2.BaseTest4;
import org.postgresql.util.PSQLState;
@@ -91,7 +92,7 @@ public void testUUIDString() throws SQLException {
ps.setString(1, uuid);
try {
ps.executeUpdate();
if (getStringType() == StringType.VARCHAR) {
if (getStringType() == StringType.VARCHAR && preferQueryMode != PreferQueryMode.SIMPLE) {
Assert.fail(
"setString(, uuid) should fail to insert value into UUID column when stringType=varchar."
+ " Expecting error <<column \"id\" is of type uuid but expression is of type character varying>>");

0 comments on commit 44bb7f8

Please sign in to comment.