aboutsummaryrefslogtreecommitdiffstats
path: root/feature-active-standby-management
AgeCommit message (Collapse)AuthorFilesLines
2020-10-07Bump drools-pdp to 1.7.3 snapshotTaka Cho1-1/+1
Issue-ID: POLICY-2839 Change-Id: I750b5130c421dafd95dc4f323e891384a7815841 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-09-08bump to 1.7.2-SNAPSHOTjhh1-1/+1
Issue-ID: POLICY-2789 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I0fb5ead444c23882454e3a48efea9d936a84e455
2020-08-31Fix more sonars in drools-pdpJim Hahn1-3/+0
Fixed more sonars in drools-pdp: - remove commented code - don't throw generic Exception - unused field (made it protected instead of private) - log conditionally - cognitive complexity - too many break/continue - return empty list instead of null - Random() is not secure Fixed more eclipse warnings: - parameterize generic types Issue-ID: POLICY-2616-sonars3 Change-Id: Ia5ad769b2ea763568cfae3d81807926d89153b09 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-10Bump drools-pdp to 1.7.1-SNAPSHOTTaka Cho1-1/+1
Issue-ID: POLICY-2709 Change-Id: Ifb6232eb428e2cd9c729fef54862779b2ee55bbc Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-29feature-eelf: eelf-core from: 1.0.0 -> 2.0.0-ossjhh1-0/+5
Issue-ID: POLICY-2387 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I29d4f07d990797a470bce0898ca67741974f1c00 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2020-06-19Address checkstyle version issues in drools-pdpJim Hahn8-38/+34
Also added serializationId to several classes to address eclipse warnings. Issue-ID: POLICY-2188 Change-Id: I3df5e8abaad8da9261c0d5cd19a93ed68dceb870 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-09reduce sonar issueTaka Cho3-40/+42
In some conditions for assertTrue, sonarcloud recommends using assertEquals Assert.assertTrue(a.equals(b)); Assert.assertTrue(a == b); Assert.assertTrue(a == null); Assert.assertTrue(a != null); Assert.assertFalse(a.equals(b)); Compliant Solution Assert.assertEquals(a, b); Assert.assertSame(a, b); Assert.assertNull(a); Assert.assertNotNull(a); Assert.assertNotEquals(a, b); Issue-ID: POLICY-2616 Change-Id: I6a4b0ac76c0816a8d4bf1914dc96210d20cdff03 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-05-21Bump Drools-Pdp to 1.7.0aditya.puthuparambil1-1/+1
Issue-ID: POLICY-2514 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: Ib18f045a621ce15f8381607ba87639dd188887e5
2020-05-21Bump Drools-Pdp to 1.6.4aditya.puthuparambil1-1/+1
Issue-ID: POLICY-2514 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech> Change-Id: Icb874f6b91488c5003e9d22460ce57e37b11dc30
2020-04-24Bump drools-pdp 1.6.3-SNAPSHOTPamela Dragosh1-1/+1
Issue-ID: POLICY-2510 Change-Id: Ic6ce8069e65c9b7606ab3529ee6291bc772a4191 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-14bump to 1.6.2-SNAPSHOTjhh1-1/+1
Issue-ID: POLICY-2378 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I75d0acdc4bfb4f2c1870d3c01591e81ada2b7a5f
2020-04-06Address sonar issues in drools-pdpJim Hahn5-19/+29
Addressed the following sonar issues: - add "final" to public static fields - commented code; some were bogus - just updated the comments so sonar is happy - use "{}" instead of string concatenation - junit should assert something - when using logger, invoke compute-intensive tasks conditionally - use superclass name instead of subclass name to access static fields - don't always return the same value - remove "transient" from fields of classes that aren't Serializable - don't nest try/catch blocks - use appropriate class name in Logger.getLogger() - use Predicate<T> instead of Function<T,Boolean> - remove unused parameters from private methods - either log or throw - remove duplicate methods - use remove() TLS instead of set(null) - null check is implicit in instanceof check - do something with return value - don't use volatile - don't return "null" list; used Optional instead - add no-arg constructor to non-Serializable superclass - add callSuper=true for EqualsAndHashCode - don't declare "throws XXX" where XXX is a subclass of RuntimeException - remove serialVersionUID field if the class isn't Serializable Also addressed some eclipse warnings: - unused fields - suppress generic typic cast warnings Issue-ID: POLICY-2305 Change-Id: I906d5bf71c1f86531423e23b3667a585cdba45e1 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-24Bump drools-pdp to 1.6.1-SNAPSHOTPeyton Puckett1-1/+1
Issue-ID: POLICY-2378 Change-Id: I59fb1860178cc7960f7aa553557d83d60b686ac6 Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2020-01-13policy/drools-pdp jdk11 upgradesHockla, Ali (ah999m)1-2/+2
Issue-ID: POLICY-1589 Change-Id: I0ed05c6e471a7da6658e02a4ba3115d3a117cedd Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
2019-11-08Miscellaneous code clean upjhh7-55/+51
Issue-ID: POLICY-2203 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I5731d4636bd2aaecbc486406298bcba1b19e8f4d Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-11-06Address drools-pdp sonar issuesJim Hahn1-7/+2
Addressed more sonar issues in drools-pdp: - unwrap multiple instances of the same annotation (NamedQuery) - use lambda instead of anonymous class - duplicate code; addressed by using annotation instead of toString. This still leaves other duplicate code. Issue-ID: POLICY-2203 Change-Id: I8c6ff6562820af638044f134eb8a6725a5f05e8e Signed-off-by: Jim Hahn <jrh3@att.com>
2019-11-04Use jersey dependencies from policy-endpointsliamfallon1-5/+0
There is no need to ahve Jersey dependencies in the PDP POMs as they are inherited fromt he policy-endpoints POM. Issue-ID: POLICY-2209 Change-Id: Iaa51995864eec0bf5b4134719c32e956295084a1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-07Modify property files in active-standby-managementPeyton Puckett2-50/+52
Remove ${env:} and update property syntax Add new property failure.threshold Add new property interval_sec Update: change property syntax back to using ${env:} Update: add 2019 to copyright information Issue-ID: POLICY-2031 Change-Id: I6db10700189197a1306c3b8fa23dff26518be0f3 Signed-off-by: Peyton Puckett <peyton.puckett@att.com>
2019-09-20Address junit failure in active-standbyJim Hahn1-199/+46
In testLocking1(), the sleep() call after the final demote() was allowing the background FPManager thread to re-promote the PDP before the next test in the test case. Removed the sleep() call, thus preventing it from being re-promoted before the test. As that's the last test in that particular test case, it shouldn't cause a problem. In the process of diagnosing and fixing the problem, made the additional changes below. Made each junit runnable independently so that background threads could be terminated and started afresh with each test. Decreased the maximum "real" wait time of the tests, as the main thread only needs to wait an instant for the other threads to fire. Modified code to use common entity manager factories rather than creating them for each test. Deleted unnecessary sleeps at the end of tests. Deleted unnecessary db clean-ups at the start of tests (already done by the @Before method. Change-Id: Ia9f1053be564d85f1b29e47379ab184ffdbac235 Issue-ID: POLICY-2080 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-10Bump versions for drools-pdp masterJim Hahn1-1/+1
Change-Id: I9882ab12334dc4b548de527ab2d7dbfc22177113 Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-21Use pseudo time for junitsJim Hahn16-426/+451
Modified feature-active-standby-management and feature-lifecycle to be able to use TestTimeMulti, eliminating the need for sleep() calls in the junit tests and speeding the tests up significantly. Also modified feature-active-standby-management to use a memory DB for its junit tests. Change-Id: I6d7ae61bb73cbb19ff405b8d9fb660e92732edbb Issue-ID: POLICY-1968 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-15Fix more sonar issues in drools-pdpJim Hahn3-615/+715
Addressed issues of cyclomatic complexity and deep nesting by refactoring code into separate methods. In some cases, had to refactor the code into nested classes to avoid passing too many parameters to the newly extracted methods. Addressed issue "too many conditionals" by breaking conditionals apart. Addressed issue "Remove usage of generic wildcard type" by eliminating "? extends" from return values. Addressed issue "Remove this use of 'Thread.sleep()'" in junit tests by introducing latches or using Awaitility. Note: this won't build until ApiUtils has been merged. Change-Id: I0d5596b4cb918a36bc22f426f426bd238195b458 Issue-ID: POLICY-1968 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-13Fix sonar issues in drools-pdpJim Hahn11-174/+98
Address sonar issue, "Move constants to a class or enum", by moving them from interfaces to classes: ActiveStandbyFeatureApi StateManagementFeatureApi PolicyResourceLockFeatureApi PolicySessionFeatureApi DroolsController DroolsControllerFeatureApi PolicyControllerFeatureApi PolicyEngineFeatureApi HealthCheck SystemPersistence EventProtocolCoder PolicyController PolicyEngine TestTransaction MdcTransaction Address sonar issue, "Move constants to a class or enum", by change the interface to a class: DroolsProperties Address sonar issue, "Override the "equals" method in this class", by adding equals & hashCode to: DroolsPdpEntity DroolsPdpImpl Use lombok for a number of getters & setters. Address sonar issue, "Define a constant instead of duplicating this literal" in: DroolsPdpsElectionHandler JpaDroolsPdpsConnector MavenDroolsController GenericEventProtocolCoder GsonProtocolCoderToolset RestManager Address sonar issue, "Remove the parentheses around the parameter" in: MavenDroolsController Address sonar issue, "Replace this lambda with a method reference" in: LifecycleFsm Address sonar issue, "Move this constructor to comply with Java Code Conventions" in: LifecycleStateRunning Address sonar issue, "Replace this 'switch' statement by 'if' statements to increase readability", as specified in: PolicyEngineManager Address sonar issue, "Rename field to prevent any misunderstanding/clash with field" in: MdcTransactionImpl Address sonar issue, "Either log or rethrow this exception", in: RestManager Address sonar issue, "Rename this constant name to" uppercase, by replacing enums with static lists in: RestManager Addressed review comments: Fixed license dates. Renamed getSiteName/setSiteName methods to getSite/setSite in the interface to match the field names in the implementation classes. Renamed *Instance classes to *Constants. Next round of review comments. Change-Id: I1c26af9f194833dd773f2b25dc5f60cde163201c Issue-ID: POLICY-1968 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-07Bump version of drools-pdpJim Hahn1-1/+1
Updated the remaining *.pom files. Updated java test file that uses the version. Changed versions in *.pom files to all be 1.0.0. Change-Id: Ia75cdfa5704b1e16b3c78e0257e619cd41220f93 Issue-ID: POLICY-1965 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-25Add coverage to MavenDroolsControllerJim Hahn4-57/+43
Change-Id: I7234c0146ef77f685a9766bb03168e385090fd1b Issue-ID: POLICY-1772 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-24Add coverage to feature-active-standby-managementJim Hahn10-557/+800
Also removed some logger.isXxx() tests, which should reduce the number of branches that need to be tested. Removed unneeded objects and methods from feature-lifecyle. Change-Id: Ic3eb9c0b63a2ad5585846525eb0ebda81fc55d5e Issue-ID: POLICY-1772 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-18Fix checkstyle issues in feature-active-standby-managementJim Hahn6-59/+28
Also deleted the checkstyle suppression file. Change-Id: I4a70c7abc8d73803c54a5c9353c7f460f815b4f0 Issue-ID: POLICY-1903 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-17Fix checkstyle issues in api-state-managementJim Hahn4-198/+198
Also deleted the checkstyle suppression file. Change-Id: Ib43a75c2e214db61a75173be095c380c7c7488f1 Issue-ID: POLICY-1902 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-17Fix checkstyle issues in api-active-standby-managementJim Hahn4-15/+15
Also deleted the checkstyle suppression file. Change-Id: I3518f29c75061dced8f507b274388f7588859037 Issue-ID: POLICY-1901 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-16Fix checkstyle issues in policy-coreJim Hahn4-21/+21
Also deleted the checkstyle suppression file. Change-Id: I93e9f9154b614b56f7826ec978e1a99bd9369348 Issue-ID: POLICY-1907 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-11Fix checkstyle issues in policy-managementJim Hahn2-3/+3
Also deleted the checkstyle suppression file. Moved classes into their own source files per checkstyle. Change-Id: I586223aac0e5b7623cfd7b0acfceca4742ecc013 Issue-ID: POLICY-1908-mgmt-style Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-28Bump drools-pdp to 1.5.1-SNAPSHOTPamela Dragosh1-1/+1
Released 1.5.0 Issue-ID: POLICY-1737 Change-Id: I2ebc4255aa7b03b1c402e825bfb714224fb7db84 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-06-21Improved test speedKrysiak Adam1-30/+37
Issue-ID: POLICY-1671 Change-Id: Ia3f9313aac1f194fd56aed9be605b590a0d51c8e Signed-off-by: Krysiak Adam <adam.krysiak@nokia.com>
2019-05-31Bump drools-pdp to version 1.5.0Jim Hahn1-1/+1
Change-Id: I6eb1f0e7dc2c0ac9b4f1594497c321aa57db8ecd Issue-ID: POLICY-1747 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-05-16Step snapshot version of drools-pdpliamfallon1-1/+1
Issue-ID: POLICY-1630 Change-Id: Ia77856077ae89f839aa930101c2002ac25f79595 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-02-21Moving hard install config to environment varsJorge Hernandez1-4/+4
Change-Id: I01e0cf2e2399ec81337961e0a2b3a349c34f55c4 Issue-ID: POLICY-1517 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2018-10-31Set new master version for Dublinliamfallon1-4/+2
Issue-ID: POLICY-1232 Change-Id: I768c9f4e0e1411854fe6aadb52abbc616654127d Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-10-24Fix refering to snapshot in policy/drools-pdp1.3.1ramverma1-1/+1
Issue-ID: POLICY-1213 Change-Id: I485c15044ba5cc0d3daceaf0876f543cc5c8af82 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-10-01Set drools-pdp checkstyle configPamela Dragosh6-14/+80
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 Dragosh16-3920/+4080
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-114/+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-265/+280
Issue-ID: POLICY-967 Change-Id: Ib19d3a89ffa328c39f7871bff59efb3dd1617f7a Signed-off-by: mmis <michael.morris@ericsson.com>
2018-07-25Copy policy-endpoints from drools-pdp to commonmmis1-1/+1
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-05-10Update of StandbyStateManagementTestKevin McKiou1-19/+6
Patch 1: This change modifies StandbyStateManagementTest testPMStandbyStateChangeNotifer() to use a fresh instance of StateManagement to avoid interaction with previous tests. Issue-ID: POLICY-790 Change-Id: I5907ba6b50091bc4f7789f102f48a853d8498ed5 Signed-off-by: Kevin McKiou <km097d@att.com>
2018-04-19Sonar cleanupMagnusen, Drew (dm741q)5-7/+50
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-02-20Sonar fixes to drools-pdpJim Hahn8-79/+81
Fixed most of the instances of the following sonar issues: Moved array designator Used diamond operator Changed System.out/err to use a logger Changed several Thread.sleep() in test code to a single sleep() Useless assignments Replaced comparison with "" to string.isEmpty() Merged if's Replaced ArrayList with List in method returns Reordered type modifiers Reordered constructor methods Defined constants for literals, or replaced them with method calls Removed "throws Xxx" for subclasses of RuntimeException Combined identical "catch" blocks Re-interrupted the current thread after catching an InterruptedException Removed tests against the literal "false" Fix indentation of new makeTopicOperError() method. Fix exception variable name in new methods, logNoUebEncoder() and logNoDmaapEncoder(). Change-Id: Iddae5210553662f733b67333b372dec8c3fe2c94 Issue-ID: POLICY-336 Signed-off-by: Jim Hahn <jrh3@att.com>