Skip to content

Commit

Permalink
Add interleaved statement test
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasHafner committed Mar 25, 2024
1 parent 1e052a4 commit c62c182
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/java/org/polypheny/jdbc/StatementTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,24 @@ void testPreparedStatementSingleExecCleanup() throws SQLException {
}
}

@Test
void testMultipleStatements() throws SQLException {
try ( PreparedStatement p = con.prepareStatement( "INSERT INTO t(id, a) VALUES (?, ?)" ) ) {
p.setInt( 1, 4 );
p.setInt( 2, 4 );
p.execute();

try ( Statement s = con.createStatement() ) {
s.execute( "INSERT INTO t(id, a) VALUES (5, 5)" );
s.execute( "INSERT INTO t(id, a) VALUES (6, 6)" );
}

p.setInt( 1, 7 );
p.setInt( 2, 7 );
p.execute();
}
}


@Test
void testPreparedStatementDualExecCleanup() throws SQLException {
Expand Down

0 comments on commit c62c182

Please sign in to comment.