From 873480b2a8f99825353582e9d0d3beae6a5ecbde Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Thu, 24 Oct 2024 17:11:57 +0100 Subject: Fix failing CSIT and add unit test proving the bug It was determined that one CSIT is intermittently failing due to a CM-handle being deleted while module sync is in progress, which causes the whole batch operation to fail. Even CM-handles that did sync will not go into READY state, despite the logs saying otherwise. This commit reproduces the issue in a unit test, and prevents the issue in the CSIT by changing test order. Also, errors during module sync tasks are reported at ERROR level. (The actual bug fix will be addressed in another patch.) Issue-ID: CPS-2474 Signed-off-by: danielhanrahan Change-Id: I7e0d617cbd48d8fd1fad036079fbd876ee21d8a8 --- .../org/onap/cps/ncmp/impl/inventory/sync/AsyncTaskExecutor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cps-ncmp-service/src/main') diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/AsyncTaskExecutor.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/AsyncTaskExecutor.java index b8bb64f537..e8ee600ea9 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/AsyncTaskExecutor.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/AsyncTaskExecutor.java @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2022-2023 Nordix Foundation + * Copyright (C) 2022-2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,9 +68,9 @@ public class AsyncTaskExecutor { private void handleTaskCompletion(final Object response, final Throwable throwable) { if (throwable != null) { if (throwable instanceof TimeoutException) { - log.warn("Async task didn't completed within the required time."); + log.error("Async task didn't completed within the required time.", throwable); } else { - log.debug("Watchdog async batch failed. caused by : {}", throwable.getMessage()); + log.error("Watchdog async batch failed.", throwable); } } } -- cgit 1.2.3-korg