From 06d2cc5cef6c414c720cb7c375788c9370754597 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Fri, 25 Oct 2019 16:46:47 +0200 Subject: [PATCH] Add missing azure error code (#48520) In #47176 we changed the internal HTTP server that emulates the Azure Storage service so that it includes a response body for injected errors. This fixed most of the issues reported in #47120 but sadly I missed to map one error to its Azure equivalent, and it triggered some CI failures today. Closes #47120 --- .../java/org/elasticsearch/repositories/azure/TestUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/TestUtils.java b/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/TestUtils.java index cdb64ecbcf5..816976f3acf 100644 --- a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/TestUtils.java +++ b/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/TestUtils.java @@ -67,8 +67,10 @@ final class TestUtils { return StorageErrorCodeStrings.BLOB_NOT_FOUND; case INTERNAL_SERVER_ERROR: return StorageErrorCodeStrings.INTERNAL_ERROR; + case SERVICE_UNAVAILABLE: + return StorageErrorCodeStrings.SERVER_BUSY; default: - return null; + throw new IllegalArgumentException("Error code [" + status.getStatus() + "] is not mapped to an existing Azure code"); } } }