Fix issues with timer manager junits 44/83744/4
authorJim Hahn <jrh3@att.com>
Fri, 29 Mar 2019 13:57:17 +0000 (09:57 -0400)
committerJim Hahn <jrh3@att.com>
Fri, 29 Mar 2019 17:19:15 +0000 (13:19 -0400)
commitdf456cc61db87de428120e287c941b47a455ff3b
tree49f62c0a9126302b87da1caf618c6abd8704d229
parent2f00429d5531304d5403638ef0796764f79abb0b
Fix issues with timer manager junits

Attempt to fix intermittent issues with junit tests for timer manager.
Eliminated duplicate method in junit test and renamed another method.
Always release a semaphore, just to be sure.
Logged different message depending whether timer is cancelled or expired.
Locked access to the current time to prevent the timer thread from
accessing it while registering a new timer.

Change-Id: Icb499acb18197fd8042eb186f88b61d5c30daeb0
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
main/src/main/java/org/onap/policy/pap/main/comm/TimerManager.java
main/src/test/java/org/onap/policy/pap/main/comm/TimerManagerTest.java