diff options
Diffstat (limited to 'vespa-feed-client')
-rw-r--r-- | vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java | 2 | ||||
-rw-r--r-- | vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpRequestStrategyTest.java | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java index 725462e5d24..4c8a4976a83 100644 --- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java +++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/HttpRequestStrategy.java @@ -166,7 +166,7 @@ class HttpRequestStrategy implements RequestStrategy { } logResponse(FINE, response, request, attempt); - if (response.code() == 500 || response.code() == 502 || response.code() == 503 || response.code() == 504) { // Hopefully temporary errors. + if (response.code() == 503) { // Hopefully temporary errors. breaker.failure(response); return retry(request, attempt); } diff --git a/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpRequestStrategyTest.java b/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpRequestStrategyTest.java index 18fa7d94117..c943e3b139f 100644 --- a/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpRequestStrategyTest.java +++ b/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/HttpRequestStrategyTest.java @@ -151,7 +151,7 @@ class HttpRequestStrategyTest { assertEquals(success, serialised.get()); // Some error responses are retried. - HttpResponse serverError = HttpResponse.of(500, null); + HttpResponse serverError = HttpResponse.of(503, null); cluster.expect((__, vessel) -> vessel.complete(serverError)); assertEquals(serverError, strategy.enqueue(id1, request).get()); assertEquals(11, strategy.stats().requests()); @@ -180,7 +180,7 @@ class HttpRequestStrategyTest { codes.put(200, 4L); codes.put(400, 1L); codes.put(429, 2L); - codes.put(500, 3L); + codes.put(503, 3L); assertEquals(codes, stats.responsesByCode()); assertEquals(3, stats.exceptions()); @@ -220,7 +220,7 @@ class HttpRequestStrategyTest { if (req == blocking) { phaser.arriveAndAwaitAdvance(); // Synchronise with test main thread, and then ... blocker.arriveAndAwaitAdvance(); // ... block dispatch thread, so we get something in the queue. - throw new RuntimeException("armageddon"); // Dispatch thread should die, tearing down everything. + throw new RuntimeException("never"); // Dispatch thread should die, tearing down everything. } else if (req == partial) { phaser.arriveAndAwaitAdvance(); // Let test thread enqueue more ops before failing (and retrying) this. |