From 21fe8829fcb1f0cc9993c501df7dadb43cf1b83e Mon Sep 17 00:00:00 2001 From: Mary Gouseti Date: Thu, 2 Feb 2023 16:41:40 +0100 Subject: [PATCH] Requiring the presence of the geoip fixture to run GeoIpDownloaderStats.testStats() (#91662) (#93459) (cherry picked from commit ab17a13157977a8f58b56bb6a6540e0234c2b444) authored-by: Keith Massey --- .../elasticsearch/ingest/geoip/GeoIpDownloaderStatsIT.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderStatsIT.java b/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderStatsIT.java index 288547b6a72d8..6076063a38b5c 100644 --- a/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderStatsIT.java +++ b/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderStatsIT.java @@ -66,6 +66,11 @@ public void disableDownloader() { } public void testStats() throws Exception { + /* + * Testing without the geoip endpoint fixture falls back to https://storage.googleapis.com/, which can cause this test to run too + * slowly to pass. + */ + assumeTrue("only test with fixture to have stable results", ENDPOINT != null); GeoIpDownloaderStatsAction.Request req = new GeoIpDownloaderStatsAction.Request(); GeoIpDownloaderStatsAction.Response response = client().execute(GeoIpDownloaderStatsAction.INSTANCE, req).actionGet(); XContentTestUtils.JsonMapView jsonMapView = new XContentTestUtils.JsonMapView(convertToMap(response));