[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@155074f2ffab21129273d3f55b8f4b9aa6d46003
@@ -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<String, String[]> 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<String, String[]> headers = new HashMap<>();
