diff options
author | 2020-02-08 14:16:15 -0500 | |
---|---|---|
committer | 2020-02-08 14:23:28 -0500 | |
commit | 1b73b599b23921b3412d60ed231de1ef8ac90dbb (patch) | |
tree | bffa64e21761c8e27ae46dd0678037cc55dbeec2 /policy-endpoints/src/test/java/org/onap | |
parent | 277c904618294d9a18d8c2b852f31666c996f810 (diff) |
Add headers to asynchronous get in HttpClient
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I61ef2fcfde5eb361652d2d6e3f55324af7ca7b4e
Diffstat (limited to 'policy-endpoints/src/test/java/org/onap')
-rw-r--r-- | policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpClientTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpClientTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpClientTest.java index d3f94cd0..5d609a65 100644 --- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpClientTest.java +++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpClientTest.java @@ -31,6 +31,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Properties; +import java.util.TreeMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import javax.ws.rs.client.Entity; @@ -204,7 +205,7 @@ public class HttpClientTest { final HttpClient client = getNoAuthHttpClient(TEST_HTTP_NO_AUTH_CLIENT, false, 6666); MyCallback callback = new MyCallback(); - final Response response = client.get(callback, HELLO).get(); + final Response response = client.get(callback, HELLO, new TreeMap<>()).get(); verifyCallback("testHttpGetNoAuthClientAsync", callback, response); @@ -316,7 +317,7 @@ public class HttpClientTest { final HttpClient client = getAuthHttpClient(); MyCallback callback = new MyCallback(); - final Response response = client.get(callback, HELLO).get(); + final Response response = client.get(callback, HELLO, null).get(); verifyCallback("testHttpAsyncAuthClient", callback, response); @@ -496,13 +497,13 @@ public class HttpClientTest { // try it asynchronously, too MyCallback callback = new MyCallback(); - response = clientPap.get(callback).get(); + response = clientPap.get(callback, null).get(); verifyCallback("testHttpAuthClientProps", callback, response); assertEquals(200, response.getStatus()); // try it asynchronously, with empty path callback = new MyCallback(); - response = clientPap.get(callback, "").get(); + response = clientPap.get(callback, "", null).get(); verifyCallback("testHttpAuthClientProps - empty path", callback, response); assertEquals(200, response.getStatus()); } |