From ea25f9b61767ba4dac49acb6c4aca1c548fd99b7 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Mon, 31 Mar 2025 09:47:53 -0500 Subject: [PATCH] Re-enabling EnterpriseGeoIpDownloaderIT with verbose logging (#125884) (cherry picked from commit 939dc8bb8ed3b2e13919fc96383377985aa4ccf1) # Conflicts: # muted-tests.yml --- .../ingest/geoip/EnterpriseGeoIpDownloaderIT.java | 11 ++++++++--- muted-tests.yml | 3 --- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/EnterpriseGeoIpDownloaderIT.java b/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/EnterpriseGeoIpDownloaderIT.java index 3a1efabb38eca..d664cc6f717aa 100644 --- a/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/EnterpriseGeoIpDownloaderIT.java +++ b/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/EnterpriseGeoIpDownloaderIT.java @@ -37,6 +37,7 @@ import org.elasticsearch.reindex.ReindexPlugin; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.test.ESIntegTestCase; +import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.transport.RemoteTransportException; import org.elasticsearch.xcontent.XContentBuilder; import org.elasticsearch.xcontent.XContentType; @@ -92,6 +93,10 @@ protected Collection> nodePlugins() { } @SuppressWarnings("unchecked") + @TestLogging( + reason = "understanding why ipinfo asn database sometimes is not loaded", + value = "org.elasticsearch.ingest.geoip.DatabaseNodeService:TRACE" + ) public void testEnterpriseDownloaderTask() throws Exception { /* * This test starts the enterprise geoip downloader task, and creates a database configuration. Then it creates an ingest @@ -126,17 +131,17 @@ public void testEnterpriseDownloaderTask() throws Exception { assertNotNull(returnedSource); Object targetFieldValue = returnedSource.get(targetField); assertNotNull(targetFieldValue); - assertThat(((Map) targetFieldValue).get("organization_name"), equalTo("Bredband2 AB")); + assertThat(((Map) targetFieldValue).get("city_name"), equalTo("Linköping")); }); assertBusy(() -> { logger.info("Ingesting another test document"); - String documentId = ingestDocument(indexName, iplocationPipelineName, sourceField, "12.10.66.1"); + String documentId = ingestDocument(indexName, iplocationPipelineName, sourceField, "103.134.48.0"); GetResponse getResponse = client().get(new GetRequest(indexName, documentId)).actionGet(); Map returnedSource = getResponse.getSource(); assertNotNull(returnedSource); Object targetFieldValue = returnedSource.get(targetField); assertNotNull(targetFieldValue); - assertThat(((Map) targetFieldValue).get("organization_name"), equalTo("OAKLAWN JOCKEY CLUB, INC.")); + assertThat(((Map) targetFieldValue).get("organization_name"), equalTo("PT Nevigate Telekomunikasi Indonesia")); }); } diff --git a/muted-tests.yml b/muted-tests.yml index ff620555e5530..1d6aa86f0c876 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -193,9 +193,6 @@ tests: - class: org.elasticsearch.xpack.restart.CoreFullClusterRestartIT method: testSnapshotRestore {cluster=UPGRADED} issue: https://github.com/elastic/elasticsearch/issues/111799 -- class: org.elasticsearch.ingest.geoip.EnterpriseGeoIpDownloaderIT - method: testEnterpriseDownloaderTask - issue: https://github.com/elastic/elasticsearch/issues/115163 - class: org.elasticsearch.xpack.deprecation.DeprecationHttpIT method: testDeprecatedSettingsReturnWarnings issue: https://github.com/elastic/elasticsearch/issues/108628