From 85c20a61edec5545bed58544f08f21c16853f205 Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Mon, 2 Sep 2024 10:00:46 +0100 Subject: Fix to allow disabling initial module delay in DMI stub This fix is needed to disable initial module delay. If initial module delay is set to zero, some first requests will still fail due to comparison being 0 > 0 == false. Issue-ID: CPS-2353 Signed-off-by: danielhanrahan Change-Id: I26869a146759312718c48f2a840234786b3ee229 --- .../ncmp/dmi/rest/stub/controller/aop/ModuleInitialProcessAspect.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/aop/ModuleInitialProcessAspect.java b/dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/aop/ModuleInitialProcessAspect.java index 96f0b804..32dfeb85 100644 --- a/dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/aop/ModuleInitialProcessAspect.java +++ b/dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/aop/ModuleInitialProcessAspect.java @@ -94,7 +94,7 @@ public class ModuleInitialProcessAspect { } private boolean isInitialProcessingCompleted(long currentTimestamp, long firstRequestTimestamp) { - return currentTimestamp - firstRequestTimestamp > moduleInitialProcessingDelayMs; + return currentTimestamp - firstRequestTimestamp >= moduleInitialProcessingDelayMs; } private long calculateRemainingProcessingTime(long currentTimestamp, long firstRequestTimestamp) { -- cgit 1.2.3-korg