summaryrefslogtreecommitdiffstats
path: root/feature-state-management/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'feature-state-management/src/main')
-rw-r--r--feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java7
-rw-r--r--feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/RepositoryAudit.java2
2 files changed, 7 insertions, 2 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 a86ac8ef..8de170c7 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
@@ -43,11 +43,13 @@ public class DbAudit extends DroolsPDPIntegrityMonitor.AuditBase
// This indicates if 'CREATE TABLE IF NOT EXISTS Audit ...' should be
// invoked -- doing this avoids the need to create the table in advance.
static private boolean createTableNeeded = true;
+
+ static public boolean isJunit = false;
/**
* @return the single 'DbAudit' instance
*/
- static DroolsPDPIntegrityMonitor.AuditBase getInstance()
+ public static DroolsPDPIntegrityMonitor.AuditBase getInstance()
{
return(instance);
}
@@ -71,6 +73,9 @@ public class DbAudit extends DroolsPDPIntegrityMonitor.AuditBase
if(logger.isDebugEnabled()){
logger.debug("Running 'DbAudit.invoke'");
}
+ if(isJunit){
+ createTableNeeded = false;
+ }
boolean isActive = true;
String dbAuditIsActive = StateManagementProperties.getProperty("db.audit.is.active");
if(logger.isDebugEnabled()){
diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/RepositoryAudit.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/RepositoryAudit.java
index 6171572a..94464cd4 100644
--- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/RepositoryAudit.java
+++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/RepositoryAudit.java
@@ -51,7 +51,7 @@ public class RepositoryAudit extends DroolsPDPIntegrityMonitor.AuditBase
/**
* @return the single 'RepositoryAudit' instance
*/
- static DroolsPDPIntegrityMonitor.AuditBase getInstance()
+ public static DroolsPDPIntegrityMonitor.AuditBase getInstance()
{
return(instance);
}