Adjust for AAA ditching WebClient 90/84790/20
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 27 Sep 2019 15:15:19 +0000 (17:15 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 24 Oct 2019 09:18:10 +0000 (11:18 +0200)
This adjust for the fact AAA is using Java 11 HttpClient.

Change-Id: Ie0afd4db88828fa76581b830e74819344d19b916
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb-bierman02/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/Bierman02RestConfWiringTest.java
restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/test/Rfc8040RestConfWiringTest.java

index 86af6c1918416d4b08830e8aa8eaeb2dbfa23d99..8853ff635c79daacc0f2237c628e24e2754557fd 100644 (file)
@@ -8,10 +8,10 @@
 package org.opendaylight.controller.sal.restconf.impl.test;
 
 import static com.google.common.truth.Truth.assertThat;
-import static org.opendaylight.infrautils.testutils.web.TestWebClient.Method.GET;
 
 import com.google.inject.AbstractModule;
 import java.io.IOException;
+import java.net.URISyntaxException;
 import javax.inject.Inject;
 import org.junit.Rule;
 import org.junit.Test;
@@ -51,7 +51,7 @@ public class Bierman02RestConfWiringTest {
     @Inject TestWebClient webClient;
 
     @Test
-    public void testWiring() throws IOException {
-        assertThat(webClient.request(GET, "/restconf/modules/").getStatus()).isEqualTo(200);
+    public void testWiring() throws IOException, InterruptedException, URISyntaxException {
+        assertThat(webClient.request("GET", "/restconf/modules/").statusCode()).isEqualTo(200);
     }
 }
index bdcca4707d116930cfc98e78023911e144f66c7a..addc750a316af8edcd649634ccdf4316d238c3d9 100644 (file)
@@ -8,12 +8,12 @@
 package org.opendaylight.restconf.nb.rfc8040.test;
 
 import static com.google.common.truth.Truth.assertThat;
-import static org.opendaylight.infrautils.testutils.web.TestWebClient.Method.GET;
 
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import com.google.inject.AbstractModule;
 import com.google.inject.Provides;
 import java.io.IOException;
+import java.net.URISyntaxException;
 import javax.inject.Inject;
 import javax.inject.Singleton;
 import org.junit.Rule;
@@ -60,7 +60,7 @@ public class Rfc8040RestConfWiringTest {
         }
 
         @Provides
-        @Singleton ServicesWrapper getServicesWrapper(Rfc8040RestConfWiring wiring) {
+        @Singleton ServicesWrapper getServicesWrapper(final Rfc8040RestConfWiring wiring) {
             return wiring.getServicesWrapper();
         }
 
@@ -82,8 +82,8 @@ public class Rfc8040RestConfWiringTest {
     @Inject SchemaContextHandler schemaContextHandler;
 
     @Test
-    public void testWiring() throws IOException {
+    public void testWiring() throws IOException, InterruptedException, URISyntaxException {
         schemaContextHandler.onGlobalContextUpdated(schemaContextProvider.getSchemaContext());
-        assertThat(webClient.request(GET, "/rests/yang-library-version").getStatus()).isEqualTo(200);
+        assertThat(webClient.request("GET", "/rests/yang-library-version").statusCode()).isEqualTo(200);
     }
 }