diff options
author | gjoranv <gjoranv@gmail.com> | 2017-07-13 14:58:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-13 14:58:32 +0200 |
commit | 7b838f08884545ec1bcb055bc09bff11c05f9a48 (patch) | |
tree | a3a88740d8321263e0f41daee85552aa348ce897 /application/src | |
parent | cde9f0d3fc9c5c322a100092318b020b238120ed (diff) | |
parent | 477d1b80e1e0468732470a46b82b2f08542f21d2 (diff) |
Merge pull request #2954 from yahoo/bjorncs/scala-improvements
Bjorncs/scala improvements
Diffstat (limited to 'application/src')
-rw-r--r-- | application/src/test/scala/com/yahoo/application/container/jersey/JerseyTest.scala | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/application/src/test/scala/com/yahoo/application/container/jersey/JerseyTest.scala b/application/src/test/scala/com/yahoo/application/container/jersey/JerseyTest.scala index 5801197602b..cdf2d9ee1c6 100644 --- a/application/src/test/scala/com/yahoo/application/container/jersey/JerseyTest.scala +++ b/application/src/test/scala/com/yahoo/application/container/jersey/JerseyTest.scala @@ -1,27 +1,23 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.application.container.jersey -import java.nio.file.{Path, Files, Paths} +import java.nio.file.{Files, Path, Paths} import javax.ws.rs.core.UriBuilder import com.yahoo.application.Networking - +import com.yahoo.application.container.JDiscTest._ import com.yahoo.container.test.jars.jersey.resources.TestResourceBase +import com.yahoo.container.test.jars.jersey.{resources => jarResources} import com.yahoo.vespa.scalalib.osgi.maven.ProjectBundleClassPaths import com.yahoo.vespa.scalalib.osgi.maven.ProjectBundleClassPaths.BundleClasspathMapping import org.apache.http.HttpResponse import org.apache.http.client.methods.HttpGet -import org.apache.http.impl.client.DefaultHttpClient +import org.apache.http.impl.client.HttpClientBuilder import org.apache.http.util.EntityUtils +import org.hamcrest.CoreMatchers.is import org.junit.Assert._ import org.junit.Test -import com.yahoo.container.test.jars.jersey.{resources => jarResources} - -import org.hamcrest.CoreMatchers.is - -import com.yahoo.application.container.JDiscTest._ - import scala.io.Source /** @@ -125,7 +121,7 @@ class JerseyTest { </services>, Networking.enable)) { jdisc => - val client = new DefaultHttpClient + val client = HttpClientBuilder.create().build() def httpGetter(path: HttpPath) = { client.execute(new HttpGet(s"http://localhost:$getListenPort/rest-api/${path.stripPrefix("/")}")) |