aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2023-06-09 10:27:53 +0100
committerFrancesco Fiora <francesco.fiora@est.tech>2023-06-09 09:42:08 +0000
commit5ccedbf315e6879005e1748baaccbfda9e81097e (patch)
tree7fccb4275be9b6405511a76e7b2127612c74f7a3 /participant/participant-impl
parentd58c0ca04ae993702b2c399afd52b01e503ec0fe (diff)
Add Minor Refactor for Intermediary to support failure handler
First part related to refactor Intermediary to support failure handler. Rest of refactor will be implemented in POLICY-4707. Issue-ID: POLICY-4732 Change-Id: I12fbec84c154937f3c197070862b18ad5675cc3e Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-impl')
-rw-r--r--participant/participant-impl/participant-impl-http/src/main/java/org/onap/policy/clamp/acm/participant/http/main/webclient/AcHttpClient.java2
-rw-r--r--participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/utils/TestListenerUtils.java1
2 files changed, 2 insertions, 1 deletions
diff --git a/participant/participant-impl/participant-impl-http/src/main/java/org/onap/policy/clamp/acm/participant/http/main/webclient/AcHttpClient.java b/participant/participant-impl/participant-impl-http/src/main/java/org/onap/policy/clamp/acm/participant/http/main/webclient/AcHttpClient.java
index a88f93aa5..1956b0d6c 100644
--- a/participant/participant-impl/participant-impl-http/src/main/java/org/onap/policy/clamp/acm/participant/http/main/webclient/AcHttpClient.java
+++ b/participant/participant-impl/participant-impl-http/src/main/java/org/onap/policy/clamp/acm/participant/http/main/webclient/AcHttpClient.java
@@ -92,7 +92,7 @@ public class AcHttpClient {
LOGGER.error("Error occurred on the HTTP response ", ex);
responseMap.put(request.getRestRequestId(),
new ImmutablePair<>(ex.getStatusCode().value(), ex.getResponseBodyAsString()));
- } catch (WebClientRequestException ex) {
+ } catch (WebClientRequestException | IllegalStateException ex) {
LOGGER.error("Error occurred on the HTTP request ", ex);
responseMap.put(request.getRestRequestId(), new ImmutablePair<>(404, ex.getMessage()));
}
diff --git a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/utils/TestListenerUtils.java b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/utils/TestListenerUtils.java
index 17d961880..5c4f06d2d 100644
--- a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/utils/TestListenerUtils.java
+++ b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/utils/TestListenerUtils.java
@@ -52,6 +52,7 @@ public final class TestListenerUtils {
var participantId = CommonTestData.getParticipantId();
participantPrimeMsg.setParticipantId(participantId);
+ participantPrimeMsg.setCompositionId(UUID.randomUUID());
participantPrimeMsg.setTimestamp(Instant.now());
participantPrimeMsg.setTimestamp(Instant.ofEpochMilli(3000));
participantPrimeMsg.setMessageId(UUID.randomUUID());