Skip to content

Commit c73ccab

Browse files
author
Samuel Nitsche
committed
Merge with latest develop and bugfix
1 parent b31a2e5 commit c73ccab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/utplsql/api/TestRunner.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.utplsql.api;
22

3+
import oracle.jdbc.OracleConnection;
34
import org.utplsql.api.compatibility.CompatibilityProvider;
45
import org.utplsql.api.exception.DatabaseNotCompatibleException;
56
import org.utplsql.api.exception.SomeTestsFailedException;
@@ -8,6 +9,7 @@
89
import org.utplsql.api.testRunner.AbstractTestRunnerStatement;
910
import org.utplsql.api.testRunner.TestRunnerStatement;
1011

12+
import java.sql.CallableStatement;
1113
import java.sql.Connection;
1214
import java.sql.SQLException;
1315
import java.util.List;
@@ -107,8 +109,10 @@ public void run(Connection conn) throws SomeTestsFailedException, SQLException,
107109
} else {
108110
// If the execution failed by unexpected reasons finishes all reporters,
109111
// this way the users don't need to care about reporters' sessions hanging.
112+
OracleConnection oraConn = conn.unwrap(OracleConnection.class);
113+
110114
try (CallableStatement closeBufferStmt = conn.prepareCall("BEGIN ut_output_buffer.close(?); END;")) {
111-
closeBufferStmt.setArray(1, oraConn.createOracleArray(CustomTypes.UT_REPORTERS, this.reporterList.toArray()));
115+
closeBufferStmt.setArray(1, oraConn.createOracleArray(CustomTypes.UT_REPORTERS, options.reporterList.toArray()));
112116
closeBufferStmt.execute();
113117
} catch (SQLException ignored) {}
114118

0 commit comments

Comments
 (0)