Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
Patch 1:
Correctly initialize DroolsPdpsElectionHandler.allSeemsWell upon
the first call to checkWaitTimer().
Issue-ID: POLICY-519
Change-Id: I0b9ad0bfba211d705c2d9f9305694956ca3951b6
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
|
|
|
|
Changes to reduce tech debt in the policy-management module.
Issue-ID: POLICY-463
Change-Id: I41f6b66d25a805706e5c9ed2cef2eda256153a37
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
Added a DMaaP simulator for testing applications. One current
limitation is that the simulator does not support multiple "subscribers"
on the same topic; if someone gets a message, that message cannot be
subsequently retrieved by anyone else. The simulator has also not been
tested for concurrent getting and posting.
Also added a way to set the response code DMaaP would return for a get
to test that policy can gracefully handle errors.
It may need some work to become truely its own "feature"
Issue-ID: POLICY-489
Change-Id: I524981bdf5e4e825f13e6197dda11d9498e4f4bf
Signed-off-by: Charles Cole <cc847m@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>
|
|
|
|
Made multiple changes across several classes to reduce technical debt in
policy-endpoints project.
Issue-ID: POLICY-462
Change-Id: I0338b9e98dd5a39492f3880c2e3a5d35b3957811
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
Made multiple changes to feature-healthcheck module to reduce technical
debt identified by sonar.
Issue-ID: POLICY-464
Change-Id: Ie168821611db5c0b171114e4fdd90411ce38a796
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@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>
|
|
Removed the sonar-maven-plugin tag from drools-pdp/pom.xml as it contained
a different groupId than the one in oparent.
Change-Id: Ibb8e798a4360eaa78c7e2430a398a1b71b9174f6
Issue-ID: POLICY-485
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
|
|
|
|
instead of synchronized read access
Change-Id: I3f4457f798d6f4d4a013bf023ed2d9c1b75d4f1f
Issue-ID: POLICY-487
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
|
|
Major changes in this commit include the refactoring of the run method in
TestTransaction.java to reduce the amount of technical debt identified by
sonar. Other small changes were also made.
Issue-ID: POLICY-467
Change-Id: I2522f690de58e3c6f4cc894e6dea47277404d745
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
|
|
Reordered modifiers.
Used diamond operator.
Change-Id: Iba3a2e035dd233574058f426744d1722a30083f7
Issue-ID: POLICY-468
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Fixed the Sonar issues in policy-core that required minimal refactoring
of the code.
Issue-ID: POLICY-461
Change-Id: I3d0f7c4411855b2c75d5ae6968665753b50bde75
Signed-off-by: Charles Cole <cc847m@att.com>
|
|
Fixed the Sonar issues in policy-utils that required minimal
refactoring of the code.
Issue-ID: POLICY-460
Change-Id: Ie88fb1d819f343c8c0bc4d0b73e41089d79cdb6c
Signed-off-by: Charles Cole <cc847m@att.com>
|
|
Under stress, the election handler in feature-active-standby-management
may not get a chance to run within the allowed window causing the
"watcher" thread to kill it and restart it. The run window is
expanded. Also the pdp.updateInterval and pdp.checkInterval
parameter values are increased appropriately in the properties file.
Issue-ID: POLICY-484
Change-Id: I0c1c2d4fdfbc408be929c56e451b92fc7ad4464a
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
|
|
|
|
Changed GroupId of dmaapClient dependency to
org.onap.dmaap.messagerouter.mirroragent and version to 1.0.0.
Issue-Id: POLICY-370
Change-Id: I165d6f0b4a64a80f344646ea1972654718ebbf96
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@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>
|
|
One last file was forgotten - released 1.1.1. Bump patch to 1.1.2
Issue-ID: POLICY-436
Change-Id: I509efb33da9aa49b8c6b47927fca0c056d5401e2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
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>
|
|
Missing staging repo
Issue-ID: POLICY-441
Change-Id: I09aeda29fe3838cf6f4cd2ed01009af541b1566d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Fix code identified by Fortify as Privacy Violation
Issue-ID: POLICY-442
Change-Id: I6097fb203a53a9643c4c4c38185515b1c8a90282
Signed-off-by: Joseph Chou <jc2555@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>
|
|
This method will ensure that once the shutdown sequence is
started, it terminates either gracefully or forcefully after
the grace time period expiration.
It has been occassionally observed that the shutdown
sequence gets stuck in the shutdown sequence of a subcomponent,
such as a drools applications. This will guarantee that
the shutdown completes regardless.
Change-Id: I8379eea5f0b80fe6a5aed6da2f2bfbfcb1f24bc0
Issue-ID: POLICY-386
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Change-Id: Ib243572c2395c9e122af3bff24d1fd8b89300166
Issue-ID: POLICY-357
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Logic inside the build method for IndexedUebTopicSinkFactory attempts
to retrieve the https property for the sink using the UEB_SOURCE_TOPICS
prefix, rather than the UEB_SINK_TOPICS prefix.
Issue-ID: POLICY-353
Change-Id: I7207d10bb7309555f49250d1eb99e91470c2f3bb
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
|
|
Added a type adapter to the encoder used without a custom encoder so
that it properly serializes Instant types.
Issue-ID: POLICY-101
Change-Id: Ic1517505d50b81abc840a1591c7fb4a75f80a126
Signed-off-by: Charles Cole <cc847m@att.com>
|
|
The sessioninfo is currently defined as a blob which is
too small in practice. This changes the definition to
a mediumblob.
Issue-ID: POLICY-301
Change-Id: I482cf08a4c4a34c4e1b7e07876984e5e3b8b1c63
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
This work is needed for consolidating the amsterdam templates used
both for junits and the official one from the archetype into one,
so junits can run in the official one.
This work revisits the functionality of when a drools controller
cannot be found to check state before delivering a message from
the drools application, it will use a standalone enconder
(previously configured to do so).
This was intended to work like this originally, but never tested
nor used as all deliveries are send through the controllers so
locked/alive state is checked (but there may ocassions where we
want to take this default action).
Change-Id: Ie23e4e13323f3ab9fd207f8a396c1af6564b7edf
Issue-ID: POLICY-101
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Issue-ID: POLICY-109
Change-Id: I3a221351e5c68514413c5744334b8c80578c3a02
Signed-off-by: Mike Babinski <mb1915@att.com>
|
|
Change-Id: I9c8c7d56a1087a0514f4d53be293e287a26ae1bf
Issue-ID: POLICY-265
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>
|
|
Added more junits to RestManagerTest.java to increase coverage
of the RestManger class to >29%.
Also cleaned up the RestManagerTest class.
Issue-Id: POLICY-109
Change-Id: I16885a945579f6aac203b47cf05294396bba2b15
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
Following independent release and versioning process guidelines.
Removed 'parent' from 'drools-artifact1' pom.xml files --
hopefully, this will get around the build problems.
Issue-ID: POLICY-225
Change-Id: I27af13edd1a39daee09c8bca6ff726881144212e
Signed-off-by: Pamela Dragosh <pdragosh@research.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>
|
|
|
|
|