Skip to content

Commit

Permalink
test: Handle cleanup of privileged connection in DatabaseMetaDataTest
Browse files Browse the repository at this point in the history
  • Loading branch information
sehrope committed Sep 11, 2021
1 parent 1c5f527 commit 5c6041b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public static Iterable<Object[]> data() {

@Before
public void setUp() throws Exception {
Connection conPriv = TestUtil.openPrivilegedDB();
if (binaryMode == BinaryMode.FORCE) {
final Properties props = new Properties();
PGProperty.PREPARE_THRESHOLD.set(props, -1);
Expand Down Expand Up @@ -93,7 +92,9 @@ public void setUp() throws Exception {
TestUtil.execute("comment on table duplicate is 'duplicate table'", con);
TestUtil.execute("create or replace function bar() returns integer language sql as $$ select 1 $$", con);
TestUtil.execute("comment on function bar() is 'bar function'", con);
TestUtil.execute("update pg_description set objoid = 'duplicate'::regclass where objoid = 'bar'::regproc",conPriv);
try (Connection conPriv = TestUtil.openPrivilegedDB()) {
TestUtil.execute("update pg_description set objoid = 'duplicate'::regclass where objoid = 'bar'::regproc", conPriv);
}

// 8.2 does not support arrays of composite types
TestUtil.createTable(con, "customtable", "c1 custom, c2 _custom"
Expand Down

0 comments on commit 5c6041b

Please sign in to comment.