diff options
author | Skip Wonnell <skip@att.com> | 2017-09-14 09:50:07 -0500 |
---|---|---|
committer | Skip Wonnell <skip@att.com> | 2017-09-14 09:53:10 -0500 |
commit | 89c46eb87ff89a0c0ef9975fc8f5dd0c5d0cc95d (patch) | |
tree | 37ed099303ed28191c81e6ce2d3bf16b89729aac /appc-dispatcher/appc-request-handler | |
parent | 2406a9706f41c06b6a67bc8908461a17e9ce2904 (diff) |
Update TTL calculation to use milliseconds
Code used mix of seconds and milliseconds
calculate TTL. Updated to use consistent
units. Also added a new test file to
increase code coverage.
Issue-ID: APPC-207
Issue-ID: APPC-181
Change-Id: I07687ac30fa2e75cedb027ec2bb71f6914d42075
Signed-off-by: Skip Wonnell <skip@att.com>
Diffstat (limited to 'appc-dispatcher/appc-request-handler')
-rw-r--r-- | appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/AbstractRequestHandlerImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/AbstractRequestHandlerImpl.java b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/AbstractRequestHandlerImpl.java index 7200c6ca1..c14b2c1e7 100644 --- a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/AbstractRequestHandlerImpl.java +++ b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/AbstractRequestHandlerImpl.java @@ -411,7 +411,7 @@ public abstract class AbstractRequestHandlerImpl implements RequestHandler { if (logger.isTraceEnabled()) { logger.trace("Entering to calculateRemainingTTL with RequestHeader = " + ObjectUtils.toString(commonHeader)); } - long usedTimeInMillis = (System.currentTimeMillis() - commonHeader.getTimeStamp().getEpochSecond()); + long usedTimeInMillis = (System.currentTimeMillis() - commonHeader.getTimeStamp().toEpochMilli()); logger.debug("usedTimeInMillis = " + usedTimeInMillis); int usedTimeInSeconds = Math.round(usedTimeInMillis / 1000); logger.debug("usedTimeInSeconds = " + usedTimeInSeconds); |