From 573c53f8f8dbd220f34b718399ddd3bd1a3121a9 Mon Sep 17 00:00:00 2001 From: tkogut Date: Wed, 24 Feb 2021 12:04:53 +0100 Subject: Honor the Retry-After HTTP header in case of 413 status code. Issue-ID: DCAEGEN2-1483 Signed-off-by: tkogut Change-Id: I429474d4a0565f5aa9bd542daa0db814c5504ef6 --- .../sdk/rest/services/cbs/client/impl/CbsClientImplTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rest-services/cbs-client/src/test/java') diff --git a/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/CbsClientImplTest.java b/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/CbsClientImplTest.java index 40cf7100..c9f92717 100644 --- a/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/CbsClientImplTest.java +++ b/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/CbsClientImplTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START==================================== * DCAEGEN2-SERVICES-SDK * ========================================================= - * Copyright (C) 2019 Nokia. All rights reserved. + * Copyright (C) 2019-2021 Nokia. All rights reserved. * ========================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package org.onap.dcaegen2.services.sdk.rest.services.cbs.client.impl; import com.google.gson.JsonObject; +import io.vavr.collection.HashMultimap; import org.junit.jupiter.api.Test; import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpMethod; import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.HttpRequest; @@ -58,6 +59,7 @@ class CbsClientImplTest { .url("http://xxx") .statusCode(200) .rawBody("{}".getBytes()) + .headers(HashMultimap.withSeq().empty()) .build(); given(httpClient.call(any(HttpRequest.class))).willReturn(Mono.just(httpResponse)); RequestDiagnosticContext diagnosticContext = RequestDiagnosticContext.create(); @@ -74,4 +76,4 @@ class CbsClientImplTest { .build()); assertThat(result.toString()).isEqualTo(httpResponse.bodyAsString()); } -} \ No newline at end of file +} -- cgit 1.2.3-korg