summaryrefslogtreecommitdiffstats
path: root/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpFeedClientTest.java
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2024-05-21 17:08:57 +0200
committerGitHub <noreply@github.com>2024-05-21 17:08:57 +0200
commit3d65e159d42ff317ca52107960c19af1a431afd1 (patch)
treef489d0f853146bb67ce28e7f4d90716c66fd75b4 /vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpFeedClientTest.java
parenta1493fc4ba682925e3c7337b98b58adf8dda9f83 (diff)
parent02850df4460cbfa744cf5d36df22be65c5921045 (diff)
Merge pull request #31265 from vespa-engine/revert-31233-jonmv/reset-jetty-client-on-circuit-breaker-trip
Revert "Replace Jetty client when tripping circuit breaker" MERGEOK
Diffstat (limited to 'vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpFeedClientTest.java')
-rw-r--r--vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpFeedClientTest.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpFeedClientTest.java b/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpFeedClientTest.java
index cec070c06a6..14ade35825f 100644
--- a/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpFeedClientTest.java
+++ b/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpFeedClientTest.java
@@ -11,7 +11,6 @@ import ai.vespa.feed.client.Result;
import ai.vespa.feed.client.ResultException;
import org.junit.jupiter.api.Test;
-import java.io.IOException;
import java.net.URI;
import java.time.Duration;
import java.util.List;
@@ -33,7 +32,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
class HttpFeedClientTest {
@Test
- void testFeeding() throws ExecutionException, InterruptedException, IOException {
+ void testFeeding() throws ExecutionException, InterruptedException {
DocumentId id = DocumentId.of("ns", "type", "0");
AtomicReference<BiFunction<DocumentId, HttpRequest, CompletableFuture<HttpResponse>>> dispatch = new AtomicReference<>();
class MockRequestStrategy implements RequestStrategy {
@@ -44,7 +43,7 @@ class HttpFeedClientTest {
@Override public CompletableFuture<HttpResponse> enqueue(DocumentId documentId, HttpRequest request) { return dispatch.get().apply(documentId, request); }
}
FeedClient client = new HttpFeedClient(new FeedClientBuilderImpl(List.of(URI.create("https://dummy:123"))).setDryrun(true),
- () -> new DryrunCluster(),
+ new DryrunCluster(),
new MockRequestStrategy());
// Update is a PUT, and 200 OK is a success.
@@ -212,7 +211,7 @@ class HttpFeedClientTest {
}
@Test
- void testHandshake() throws IOException {
+ void testHandshake() {
// dummy:123 does not exist, and results in a host-not-found exception.
FeedException exception = assertThrows(FeedException.class,
() -> new HttpFeedClient(new FeedClientBuilderImpl(List.of(URI.create("https://dummy:123")))));
@@ -239,19 +238,19 @@ class HttpFeedClientTest {
assertEquals("server does not support speed test; upgrade to a newer version",
assertThrows(FeedException.class,
() -> new HttpFeedClient(new FeedClientBuilderImpl(List.of(URI.create("https://dummy:123"))).setSpeedTest(true),
- () -> cluster,
+ cluster,
null))
.getMessage());
// Old server.
new HttpFeedClient(new FeedClientBuilderImpl(List.of(URI.create("https://dummy:123"))),
- () -> cluster,
+ cluster,
null);
// New server.
response.set(okResponse);
new HttpFeedClient(new FeedClientBuilderImpl(List.of(URI.create("https://dummy:123"))),
- () -> cluster,
+ cluster,
null);
}