summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java16
-rw-r--r--feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java2
2 files changed, 14 insertions, 4 deletions
diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java
index cde6e4e4..b2830e8c 100644
--- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java
+++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java
@@ -44,11 +44,21 @@ public class DbAudit extends DroolsPDPIntegrityMonitor.AuditBase
// invoked -- doing this avoids the need to create the table in advance.
static private boolean createTableNeeded = true;
- static public boolean isJunit = false;
-
synchronized private static void setCreateTableNeeded(boolean b) {
DbAudit.createTableNeeded = b;
- }
+ }
+
+ static private boolean isJunit = false;
+
+ synchronized public static void setIsJunit(boolean b) {
+ DbAudit.isJunit = b;
+ }
+
+ public static boolean isJunit(){
+ return DbAudit.isJunit;
+ }
+
+
/**
* @return the single 'DbAudit' instance
*/
diff --git a/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java b/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java
index ba7ce3ea..6f2a0e25 100644
--- a/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java
+++ b/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java
@@ -110,7 +110,7 @@ public class StateManagementTest {
String configDir = "src/test/resources";
- DbAudit.isJunit = true;
+ DbAudit.setIsJunit(true);
Properties fsmProperties = new Properties();
fsmProperties.load(new FileInputStream(new File(