From 260da964591914856164e591246c5bea068234aa Mon Sep 17 00:00:00 2001 From: pesse Date: Thu, 10 Jun 2021 23:20:31 +0200 Subject: [PATCH 1/2] Add new config option so Catching "Ora Stuck" is not enabled by default Reson for this that I have the assumption that catch is too greedy, leading to more abort- and retries than necessary. --- src/main/java/org/utplsql/api/TestRunner.java | 11 ++++++++++- src/main/java/org/utplsql/api/TestRunnerOptions.java | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/utplsql/api/TestRunner.java b/src/main/java/org/utplsql/api/TestRunner.java index 437549a..fe0c485 100644 --- a/src/main/java/org/utplsql/api/TestRunner.java +++ b/src/main/java/org/utplsql/api/TestRunner.java @@ -145,6 +145,11 @@ public TestRunner addTags(Collection tags) { return this; } + public TestRunner catchOraStuck( boolean catchOraStuck ) { + this.options.catchOraStuck = catchOraStuck; + return this; + } + public TestRunnerOptions getOptions() { return options; } private void delayedAddReporters() { @@ -213,7 +218,7 @@ public void run(Connection conn) throws SQLException { TestRunnerStatement testRunnerStatement = null; try { - testRunnerStatement = initStatementWithTimeout(conn); + testRunnerStatement = ( options.catchOraStuck ) ? initStatementWithTimeout(conn) : initStatement(conn); logger.info("Running tests"); testRunnerStatement.execute(); logger.info("Running tests finished."); @@ -227,6 +232,10 @@ public void run(Connection conn) throws SQLException { } } + private TestRunnerStatement initStatement( Connection conn ) throws SQLException { + return compatibilityProxy.getTestRunnerStatement(options, conn); + } + private TestRunnerStatement initStatementWithTimeout( Connection conn ) throws OracleCreateStatmenetStuckException, SQLException { ExecutorService executor = Executors.newSingleThreadExecutor(); Callable callable = () -> compatibilityProxy.getTestRunnerStatement(options, conn); diff --git a/src/main/java/org/utplsql/api/TestRunnerOptions.java b/src/main/java/org/utplsql/api/TestRunnerOptions.java index 3fe39c1..de8ee12 100644 --- a/src/main/java/org/utplsql/api/TestRunnerOptions.java +++ b/src/main/java/org/utplsql/api/TestRunnerOptions.java @@ -30,6 +30,7 @@ public class TestRunnerOptions { public boolean randomTestOrder = false; public Integer randomTestOrderSeed; public final Set tags = new LinkedHashSet<>(); + public boolean catchOraStuck = false; public String getTagsAsString() { return String.join(",", tags); From f74127b6bb1393e3b09f1c6eae2611dd32bac7ea Mon Sep 17 00:00:00 2001 From: pesse Date: Thu, 10 Jun 2021 23:39:53 +0200 Subject: [PATCH 2/2] Add utPLSQL core 3.1.9 and 3.1.10 to test matrix --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 29d7f41..0c3726d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,8 @@ env: - UTPLSQL_VERSION="v3.1.6" - UTPLSQL_VERSION="v3.1.7" - UTPLSQL_VERSION="v3.1.8" + - UTPLSQL_VERSION="v3.1.9" + - UTPLSQL_VERSION="v3.1.10" - UTPLSQL_VERSION="develop" UTPLSQL_FILE="utPLSQL"