aboutsummaryrefslogtreecommitdiffstats
path: root/feature-state-management
AgeCommit message (Collapse)AuthorFilesLines
2018-10-01Set drools-pdp checkstyle configPamela Dragosh5-19/+87
Fixed last remaining checkstyle issues along with setting the pom.xml to the correct path setting. Fixed forbidden summary fragments, not allowed to prepend summary with "This method returns" Issue-ID: POLICY-1153 Change-Id: I267842080494132a7b5507731e14f027a3f6fe44 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-13Fix checkstyle for features submodules.Pamela Dragosh11-1320/+1258
These are the remaining submodules that have checkstyle. Pretty clean compile after this. There were a couple of sonar fixes in there also. Issue-ID: POLICY-882 Change-Id: I8191ea1aa261f4a7b9d3d21c108572fd31db1b8c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-29Set parent to policy/parentPamela Dragosh1-115/+112
Set the parent to point to policy/parent instead of oparent. Clean up some duplicate management versions. Change-Id: I28957b05b80c9564ad32c958143822b6b0768219 Issue-ID: INT-619 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-07-30Copy policy-endpoints from drools-pdp to commonmmis1-3/+1
Issue-ID: POLICY-967 Change-Id: Ib19d3a89ffa328c39f7871bff59efb3dd1617f7a Signed-off-by: mmis <michael.morris@ericsson.com>
2018-07-25Copy policy-endpoints from drools-pdp to commonmmis2-467/+460
Removed policy-endpoints, and 3 classes from policy-core. Replaced refenences to the deleted classes with references to the corresponding classes in policy-common Issue-ID: POLICY-967 Change-Id: I547cde4894424b8f40b7ddd4e2342ebb729cb588 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-06-05Update drools-pdp to SNAPSHOT-1.3.0liamfallon1-1/+1
Snapshot updated for Casablanca. Change-Id: I75c0a41ce2c1a56ab658be8bfd27a5c81977f990 Issue-ID: POLICY-875 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-05-21Update Policy Drools PDP to 1.2.3-SNAPSHOTliamfallon1-1/+1
These reviews must be merged in order because of layering. This review should be merged SECOND. Change-Id: I3d3fb84622686b23d435aaf0cd43d307684a4a1f Issue-ID: POLICY-844 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-05-16Upgrade SNAPSHOT to 1.2.2liamfallon1-1/+1
These reviews must be merged in order because of layering. This review should be merged THIRD Change-Id: Icdb5c18106ade60bbc1eea67a1b42e70ac5383e5 Issue-ID: POLICY-798 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-04-19Sonar cleanupMagnusen, Drew (dm741q)1-3/+4
More sonar cleanup. Resolved some of the simpler issues. Issue-ID: POLICY-728 Change-Id: If9c4718f10c6d3524239d2a05c09badb791ef2f0 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2018-04-13Update SNAPSHOT to 1.2.1Pamela Dragosh1-1/+1
Issue-ID: POLICY-736 Change-Id: Ic293a7347db4e5001a4084e1b98c5d44a145d16c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-03-21Fix bugs identified by Sonar on drools-pdpliamfallon2-5/+6
Three bugs fixed: 1. Set of static variable in DMaaPSimulatorJaxR 2. Use of opssibly null variable "output" in RepositoryAudit 3. Unreachable statement error in RepositoryAudit Change-Id: I72e028cfc51a82250afd02fb4109d3dea08072dc Issue-ID: POLICY-691 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-02-19Fix compilation issue due to generic ExceptionJim Hahn1-2/+2
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>
2018-02-06Fix sonar issues with RepositoryAuditJim Hahn1-2/+0
Per sonar, removed commented code from RepositoryAudit. Change-Id: Ia81780f7528bd4fc42062454728a2c215709ea45 Issue-ID: POLICY-469 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-01-31Fix sonar issues in feature-state-managementJim Hahn4-184/+198
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>
2018-01-18Resolve bug in DroolsPDPIntegrityMonitorMagnusen, Drew (dm741q)1-8/+20
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>
2017-12-13Fix issues blocking election handler threadKevin McKiou2-4/+10
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>
2017-12-01Modified state mgmt to fix some sonar issuesJim Hahn6-159/+198
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>
2017-11-21Bump minor versionJessica Wagantall1-1/+1
Bump minor version in preparation for Amsterdam branching. Change-Id: I7a10894837580ae898573156e47e31f32ae0d041 Issue-ID: CIMAN-120 Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
2017-11-15Update to 1.1.2-SNAPSHOTPamela Dragosh1-1/+1
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>
2017-11-08Update SNAPSHOT versionPamela Dragosh1-1/+1
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>
2017-11-02Modify state-management propertiesv1.1.0Kevin McKiou6-112/+190
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>
2017-10-30clean leftover items in parent pom pre-releaseJorge Hernandez1-1/+1
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>
2017-09-27SonarCube Critical IssueKevin McKiou2-4/+14
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>
2017-09-25junits fixesJorge Hernandez1-2/+2
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>
2017-09-25Merge "Incr State Mgmt Code Coverage"Jorge Hernandez6-26/+111
2017-09-25Incr State Mgmt Code CoverageKevin McKiou6-27/+111
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>
2017-09-21Removed useless parenthesesrama-huawei3-39/+45
Added diamond symbol on RHS Issue-ID: POLICY-239 Change-Id: I24c138703047308c2e28fef2180a0bb64400c1c9 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
2017-09-18feature-state-management failing junitsJorge Hernandez1-0/+5
because junit library is not part of the pom. Change-Id: I4e8c12edfe2e91dcdb90200b8d4f37e35109f448 Issue-ID: POLICY-155 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-09-18Fix sonar blocker/criticalPamela Dragosh7-106/+74
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>
2017-09-14Addition of State Management FeatureMagnusen, Drew (dm741q)17-0/+2394
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>