diff options
author | 2019-03-11 13:52:55 +0100 | |
---|---|---|
committer | 2019-03-11 14:21:34 +0100 | |
commit | e7b3b87f5be3bb64f43ff5731e7814c9163b9880 (patch) | |
tree | a299b15f769270e65bb7ff8a8e317afd0a5adb9f /rest-services/cbs-client/src/test/java | |
parent | a4f366a2ad67e77bf221df4aa608e379d9eaa1f3 (diff) |
Emit error on service discovery failure
- moved cbs-client exceptions to single API module
Change-Id: I1b0d45f231d39b600beebb7fad1ef2dba941dbad
Issue-ID: DCAEGEN2-1302
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
Diffstat (limited to 'rest-services/cbs-client/src/test/java')
-rw-r--r-- | rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/CbsLookupTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/CbsLookupTest.java b/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/CbsLookupTest.java index 77cfaf63..6843e0e3 100644 --- a/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/CbsLookupTest.java +++ b/rest-services/cbs-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/impl/CbsLookupTest.java @@ -31,6 +31,7 @@ import com.google.gson.JsonParser; import java.io.InputStreamReader; import java.net.InetSocketAddress; import org.junit.jupiter.api.Test; +import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.api.exceptions.ServiceLookupException; import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.EnvProperties; import org.onap.dcaegen2.services.sdk.rest.services.adapters.http.CloudHttpClient; import org.onap.dcaegen2.services.sdk.rest.services.cbs.client.model.ImmutableEnvProperties; @@ -65,7 +66,7 @@ class CbsLookupTest { } @Test - void lookupShouldReturnEmptyResultWhenServiceArrayIsEmpty() { + void lookupShouldEmitErrorWhenServiceArrayIsEmpty() { // given givenConsulResponse(new JsonArray()); @@ -73,7 +74,7 @@ class CbsLookupTest { final Mono<InetSocketAddress> result = cut.lookup(env); // then - StepVerifier.create(result).verifyComplete(); + StepVerifier.create(result).verifyError(ServiceLookupException.class); } private JsonElement parseResource(String resource) { |