junits fixes
I found multiple issues from latest junit submissions when I built in
my local that I tried to fix.
1. feature-test-transaction - prone to race conditions as we have
experienced in some jenkins builds. There is an assert that checks
if the thread is alive that monitors a policy controller kiesession
sanity. The thread is very short-lived as it will exit right away
since it detects that the underlying "drools session"
does not have an attached rules artifact (brainless).
Removed that check to fix the race condition.
2. With the increment of junits in the PolicyEngine.manager for
multiple packages, it seems that the static instance is reused
across junits (which surprised me), so configuration files that
are not supposed to be read in junits for a package are
read, and for example the lock state could propagate across junits.
I tried to clean all that up to make sure that each junit deals with
what is has created and state does not propagate to other junits.
3. feature-active-standy-management had a missing "junit" dependency.
I generated the effective pom, and indeed did not show, some junits
failed to compile in the test phase. Adding the test dependency
fixed the problem.
As a note, the feature-active-standy-management junits, take over 20 minutes to run.
This time is excessive (see below):
logs$ head -1 debug.log
2017-09-25 21:24:21.630 [main] DEBUG o.o.p.d.c.t.StandbyStateManagementTest.setUpClass(111) - setUpClass: userDir=/media/sf_jh1730/dev/open/LF/git/master/policy/drools-pdp/feature-active-standby-management
logs$ tail -1 debug.log
2017-09-25 21:46:29.801 [Timer-46] DEBUG o.o.p.d.a.DroolsPdpsElectionHandler.run(919) - TimerUpdateClass.run.exit
Change-Id: Ie3167e5f784f35f98fa08997e624c51f976b6501
Issue-ID: POLICY-109
Signed-off-by: Jorge Hernandez <jh1730@att.com>
diff --git a/feature-state-management/pom.xml b/feature-state-management/pom.xml
index 033d36d..db5afe6 100644
--- a/feature-state-management/pom.xml
+++ b/feature-state-management/pom.xml
@@ -113,7 +113,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
- <version>[1.4.186,)</version>
+ <version>1.4.196</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -133,7 +133,7 @@
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>