From 22c804ed247cea2a67b6b5648b06d17d0c3b1c96 Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Fri, 6 Oct 2017 08:59:44 -0600 Subject: [PATCH] [Monitoring] Fix HttpExporterIT (elastic/x-pack-elasticsearch#2702) Uses the appropriate overload of `generateRandomStringArray` to disallow empty arrays from being returned. Original commit: elastic/x-pack-elasticsearch@2596653ca123e66416483d11a4c4f7d7c7ea635d --- .../xpack/monitoring/exporter/http/HttpExporterIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java index 3baffba56d9..d922b70d786 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java @@ -139,7 +139,7 @@ public class HttpExporterIT extends MonitoringIntegTestCase { public void testExportWithHeaders() throws Exception { final String headerValue = randomAlphaOfLengthBetween(3, 9); - final String[] array = generateRandomStringArray(2, 4, false); + final String[] array = generateRandomStringArray(2, 4, false, false); final Map headers = new HashMap<>(); @@ -176,7 +176,7 @@ public class HttpExporterIT extends MonitoringIntegTestCase { final boolean useHeaders = randomBoolean(); final String headerValue = randomAlphaOfLengthBetween(3, 9); - final String[] array = generateRandomStringArray(2, 4, false); + final String[] array = generateRandomStringArray(2, 4, false, false); final Map headers = new HashMap<>();