summaryrefslogtreecommitdiffstats
path: root/feature-test-transaction
diff options
context:
space:
mode:
authorMagnusen, Drew (dm741q) <dm741q@att.com>2017-09-07 08:55:17 -0500
committerMagnusen, Drew (dm741q) <dm741q@att.com>2017-09-07 12:02:31 -0500
commit831bd8e5d00be1b5b15f795362ea99bf5159559a (patch)
treed0657df9818f14ea169330d850f61a3abb1dddb9 /feature-test-transaction
parentf6679d84b20e79e8f9753fbdea08ecd20b913e75 (diff)
Small change to please sonar
Added a 'Thread.currentThread().interrupt()' in a catch of the run method of TTControllerTask at the direction of sonar. Added dump of exception to logger. Issue-ID: POLICY-213 Change-Id: I2bdd74eacedb6d1950c5c730430d7f723ce494bc Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
Diffstat (limited to 'feature-test-transaction')
-rw-r--r--feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransaction.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransaction.java b/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransaction.java
index 4da6b6ee..e5cff243 100644
--- a/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransaction.java
+++ b/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransaction.java
@@ -89,6 +89,7 @@ class TTImpl implements TestTransaction {
*
*/
class TTControllerTask implements Runnable {
+
// get an instance of logger
private static final Logger logger = LoggerFactory.getLogger(TTControllerTask.class);
@@ -184,9 +185,10 @@ class TTControllerTask implements Runnable {
}
} catch (final InterruptedException e) {
logger.info("{}: stopping ...", this, e);
+ Thread.currentThread().interrupt();
} catch (final IllegalArgumentException e) {
logger.error("{}: controller {} has not been enabled for testing: ", this,
- this.controller.getName(), e.getMessage());
+ this.controller.getName(), e.getMessage(), e);
} catch (final Exception e) {
logger.error("Controller: {} is not testable - TestTransaction caught exception: {} ",
this.controller.getName(), e.getMessage());
@@ -209,5 +211,4 @@ class TTControllerTask implements Runnable {
builder.append("]");
return builder.toString();
}
-
}