Skip to content

Commit 68b73cb

Browse files
committed
Re-enabling EnterpriseGeoIpDownloaderIT with verbose logging (#125884)
1 parent d9fdcf7 commit 68b73cb

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/EnterpriseGeoIpDownloaderIT.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.elasticsearch.reindex.ReindexPlugin;
3636
import org.elasticsearch.rest.RestStatus;
3737
import org.elasticsearch.test.ESIntegTestCase;
38+
import org.elasticsearch.test.junit.annotations.TestLogging;
3839
import org.elasticsearch.transport.RemoteTransportException;
3940
import org.elasticsearch.xcontent.XContentType;
4041
import org.junit.ClassRule;
@@ -87,6 +88,10 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
8788
}
8889

8990
@SuppressWarnings("unchecked")
91+
@TestLogging(
92+
reason = "understanding why ipinfo asn database sometimes is not loaded",
93+
value = "org.elasticsearch.ingest.geoip.DatabaseNodeService:TRACE"
94+
)
9095
public void testEnterpriseDownloaderTask() throws Exception {
9196
/*
9297
* This test starts the enterprise geoip downloader task, and creates a database configuration. Then it creates an ingest
@@ -121,17 +126,17 @@ public void testEnterpriseDownloaderTask() throws Exception {
121126
assertNotNull(returnedSource);
122127
Object targetFieldValue = returnedSource.get(targetField);
123128
assertNotNull(targetFieldValue);
124-
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("Bredband2 AB"));
129+
assertThat(((Map<String, Object>) targetFieldValue).get("city_name"), equalTo("Linköping"));
125130
});
126131
assertBusy(() -> {
127132
logger.info("Ingesting another test document");
128-
String documentId = ingestDocument(indexName, iplocationPipelineName, sourceField, "12.10.66.1");
133+
String documentId = ingestDocument(indexName, iplocationPipelineName, sourceField, "103.134.48.0");
129134
GetResponse getResponse = client().get(new GetRequest(indexName, documentId)).actionGet();
130135
Map<String, Object> returnedSource = getResponse.getSource();
131136
assertNotNull(returnedSource);
132137
Object targetFieldValue = returnedSource.get(targetField);
133138
assertNotNull(targetFieldValue);
134-
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("OAKLAWN JOCKEY CLUB, INC."));
139+
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("PT Nevigate Telekomunikasi Indonesia"));
135140
});
136141
}
137142

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ tests:
9292
- class: org.elasticsearch.xpack.apmdata.APMYamlTestSuiteIT
9393
method: test {yaml=/10_apm/Test template reinstallation}
9494
issue: https://github.com/elastic/elasticsearch/issues/116445
95-
- class: org.elasticsearch.ingest.geoip.EnterpriseGeoIpDownloaderIT
96-
method: testEnterpriseDownloaderTask
97-
issue: https://github.com/elastic/elasticsearch/issues/115163
9895
- class: org.elasticsearch.versioning.ConcurrentSeqNoVersioningIT
9996
method: testSeqNoCASLinearizability
10097
issue: https://github.com/elastic/elasticsearch/issues/117249

0 commit comments

Comments
 (0)