Age | Commit message (Collapse) | Author | Files | Lines |
|
After modifying common to remove generic Exceptions, drools-pdp would
no longer compile. Had to modify drools-pdp to accomodate the
specific exception.
Change-Id: Ib804da2ebfc7dbf5f4035ba3d48832ffe541f902
Issue-ID: POLICY-246
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Per sonar, removed commented code from RepositoryAudit.
Change-Id: Ia81780f7528bd4fc42062454728a2c215709ea45
Issue-ID: POLICY-469
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
DroolsPDPIntegrityMonitor.java:
Modified init() to throw just IntegrityMonitorException.
Modified DroolsPDPIntegrityMonitor init() method to throw specific
types of exceptions.
StateManagementFeature.java:
Sonar complained about needing to merge "if" statements, but chose
to eliminate the "if(logger.isDebugEnabled())" instead - did this
through-out the source file.
Removed extra runtime exception from "throws" declaration.
DbAudit.java:
Fixed sonar issue regarding setting a static variable from within
a non-static method.
Removed logger.isDebugEnabled() tests where method calls are not involed.
Simplified invoke() method complexity as reported by sonar.
DroolsPDPIntegrityMonitor.java:
Reduced init() complexity reported by sonar.
Change-Id: Ib2722b21bbf3aad130af46c8790f40d8777e36be
Issue-ID: POLICY-469
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
This fix ensures that the testServices, testRestClasses, tesManaged, and
testSwagger properties are all populated in the stateManagementProperties
object within DroolsPDPIntegrityMonitor class.
Issue-ID: POLICY-564
Change-Id: Ie517b19f61ab084416ce1e6f8418d69dc9e4f85d
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
This bug tracks the AT&T bug 355533. The symptom was that drools
pdps that were backing each other up were becoming stuck in a
standby state. The cause was that the election handler thread was
being hung by a call to PolicyEngine.manager.deactivate which shuts
down the topic endpoints when the drools pdp operational state
transitions to disabled. Related problems were that the election
handler heartbeat was NOT blocked when the main thread was blocked
and the IntegrityMonitor forward progress counter was NOT blocked
from incrementing when the election handler thread was blocked.
This prevented the correct failover of the drools pdp to another
healthy one. This change fixes the two causes of the thread blockage,
moves the election handler heartbeat to the main thread and adds an
interface (AllSeemsWell) which is called when the election handler
has stalled/resumed. The AllSeemsWell interface will block forward
progress counter increments when ALLNOTWELL and will resume forward
progress counter increments when ALLSEEMSWELL. In addition, it reduces
the run time of the StandbyStateManagementTest from approximately 8
minutes to approximately 2 minutes. Since this changes classes also
changed by POLICY-444, this change must be merged before POLICY-444
can be merged.
Issue-ID: POLICY-501
Change-Id: I7b8180d11077ccf59b21b6484cb58b5522a3df8f
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
Reordered modifiers.
Reordered variables, methods, and constructors.
Removed useless parentheses.
Removed unneeded "catch" clauses.
Extracted nested try blocks into their own method.
Replaced a string with a constant.
Removed extra thrown exceptions when they are unnecessary (i.e., they're
subclasses of RuntimeException, or the method is already declared to
throw an Exception).
Replaced a large anonymous class with a named, nested class.
Separated variable declarations onto individual lines.
Changed "String args[]" to "String[] args".
Replaced if-then-else by single return statement.
Invoked super() inside empty, default constructor.
Removed Thread.sleep() calls from junit test per comments on 11/29.
Commented out Thread.sleep() in junit tests, as they don't appear to
be necessary. If that turns out to be untrue, then CountdownLatch.await()
can be used instead.
Sonar complained about useless assignments to "phase", but those did
not appear to be useless.
Did not remove commented-out lines, as they may be needed when debugging.
Change-Id: I90ba6f7317a18a10ce1b881cfc6d21a602171ff5
Issue-ID: POLICY-469
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Bump minor version in preparation for Amsterdam
branching.
Change-Id: I7a10894837580ae898573156e47e31f32ae0d041
Issue-ID: CIMAN-120
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
|
|
Released 1.1.1, bump patch to 1.1.2
Issue-ID: POLICY-436
Change-Id: Idc58c1dc0cd66243ca1b94cce2ef4254ef2d87c8
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Releasing v1.1.0 so we need to update SNAPSHOT
Issue-ID: POLICY-436
Change-Id: I0c24b0c9a5bd67471ad0fb8b8c17b77e5b70b44f
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Patch 1:
Removed hostPort and added server.TEST properties from
feature-state-management.properties and modified associated
code in IntegrityMonitor and properties in associated JUnit tests.
Patch 2:
Modified in response to comments from Jorge Hernandez. Including
adding contant usage instead of strings and replacing generic exceptions
with specific exceptions.
Patch 3:
Tied property constants to PolicyProperties. Added default property
contants. Added error/warning log statemeents when something other
than expected value is used. Add logging of all constant values
for inspection in debugging.
Issue-ID: POLICY-369
Change-Id: Ie2218b68761e0338642a2ed28ef840b1b6ece1a4
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
snapshot dependencies are not permitted
it should an actual released version, or project.version
if the plan is to release it at the same time.
the maven version plugin was also left over from
previous oparent work
documenting accepted version of xml-apis.
Change-Id: I8b76bd9befdf69674aafe7b14bfbcc7d2f938062
Issue-ID: POLICY-404
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Patch 1: Modifying DbAudit to access isJunit variable
to, hopefully, satisfy SonarCube on a critical issue.
Issue-ID: POLICY-261
Change-Id: Ibc1a2876bdf08377798c503110b05e79a0986c38
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
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>
|
|
|
|
Patch 1: Added JUnit tests to feature-state-management
to increase coverage. Estimated coverage is now 48%.
Patch 2: Trivial change to force a rebuild. Patch 3:
Tweaking the JUnit to try and account for the difference
between the LF environment and my local environment.
Patch 4: Something caused the policy endpoints JUnits
to fail - unrelated to these changes. Made a trival
change to force a rebuild. Patch 5: Trivial change to
force rebuild. Patch 6: Minor changes in response to
Jorge Hernandez comments.
Issue-ID; POLICY-266
Change-Id: I7979c200ab18d5861ba20e0d5f23bd0083193daa
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
Added diamond symbol on RHS
Issue-ID: POLICY-239
Change-Id: I24c138703047308c2e28fef2180a0bb64400c1c9
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
|
|
because junit library is not part of the pom.
Change-Id: I4e8c12edfe2e91dcdb90200b8d4f37e35109f448
Issue-ID: POLICY-155
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Also add back .gitignore
Sonar blocker for change condition always true. Easier to re-write
this using try-with-resources.
Use synchronized static method to set a static variable.
Don't use e.printStackTrace it causes sonar critical to log exception
Log the bytes read. Ideally I would re-write this using Java 8 NIO
Issue-ID: POLICY-195
Change-Id: I080d1ad4c8bea91f87c3eca109325700e1589558
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Patch 1:This commit adds the feature to provide node state management.
There are also a couple of very minor cleanup items in
feature-session-persistence which came up during review and testing.
Patch 2: Cleaned up some logging statements and exceptions per
comments by Pam Dragosh. Patch 3: Clean up per comments from
Jorge Hernandez. Patch4: Added a default to ignoreErrors in
RepositoryAudit. Patch 5: Rebase. Patch 6: Removed
api-state-management/.gitignore
Issue-ID: POLICY-155
Change-Id: I4fbfa33314d488ff46764931ca965f802b6a26d5
Signed-off-by: Kevin McKiou <km097d@att.com>
|