File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
src/main/java/org/utplsql/api Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,11 @@ public TestRunner addTags(Collection<String> tags) {
145145 return this ;
146146 }
147147
148+ public TestRunner catchOraStuck ( boolean catchOraStuck ) {
149+ this .options .catchOraStuck = catchOraStuck ;
150+ return this ;
151+ }
152+
148153 public TestRunnerOptions getOptions () { return options ; }
149154
150155 private void delayedAddReporters () {
@@ -213,7 +218,7 @@ public void run(Connection conn) throws SQLException {
213218
214219 TestRunnerStatement testRunnerStatement = null ;
215220 try {
216- testRunnerStatement = initStatementWithTimeout (conn );
221+ testRunnerStatement = ( options . catchOraStuck ) ? initStatementWithTimeout ( conn ) : initStatement (conn );
217222 logger .info ("Running tests" );
218223 testRunnerStatement .execute ();
219224 logger .info ("Running tests finished." );
@@ -227,6 +232,10 @@ public void run(Connection conn) throws SQLException {
227232 }
228233 }
229234
235+ private TestRunnerStatement initStatement ( Connection conn ) throws SQLException {
236+ return compatibilityProxy .getTestRunnerStatement (options , conn );
237+ }
238+
230239 private TestRunnerStatement initStatementWithTimeout ( Connection conn ) throws OracleCreateStatmenetStuckException , SQLException {
231240 ExecutorService executor = Executors .newSingleThreadExecutor ();
232241 Callable <TestRunnerStatement > callable = () -> compatibilityProxy .getTestRunnerStatement (options , conn );
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ public class TestRunnerOptions {
3030 public boolean randomTestOrder = false ;
3131 public Integer randomTestOrderSeed ;
3232 public final Set <String > tags = new LinkedHashSet <>();
33+ public boolean catchOraStuck = false ;
3334
3435 public String getTagsAsString () {
3536 return String .join ("," , tags );
You can’t perform that action at this time.
0 commit comments