Skip to content

Commit f6c9882

Browse files
authored
Re-enabling EnterpriseGeoIpDownloaderIT with verbose logging (elastic#125884) (elastic#125966)
1 parent c918228 commit f6c9882

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
@@ -37,6 +37,7 @@
3737
import org.elasticsearch.reindex.ReindexPlugin;
3838
import org.elasticsearch.rest.RestStatus;
3939
import org.elasticsearch.test.ESIntegTestCase;
40+
import org.elasticsearch.test.junit.annotations.TestLogging;
4041
import org.elasticsearch.transport.RemoteTransportException;
4142
import org.elasticsearch.xcontent.XContentBuilder;
4243
import org.elasticsearch.xcontent.XContentType;
@@ -92,6 +93,10 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
9293
}
9394

9495
@SuppressWarnings("unchecked")
96+
@TestLogging(
97+
reason = "understanding why ipinfo asn database sometimes is not loaded",
98+
value = "org.elasticsearch.ingest.geoip.DatabaseNodeService:TRACE"
99+
)
95100
public void testEnterpriseDownloaderTask() throws Exception {
96101
/*
97102
* 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 {
126131
assertNotNull(returnedSource);
127132
Object targetFieldValue = returnedSource.get(targetField);
128133
assertNotNull(targetFieldValue);
129-
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("Bredband2 AB"));
134+
assertThat(((Map<String, Object>) targetFieldValue).get("city_name"), equalTo("Linköping"));
130135
});
131136
assertBusy(() -> {
132137
logger.info("Ingesting another test document");
133-
String documentId = ingestDocument(indexName, iplocationPipelineName, sourceField, "12.10.66.1");
138+
String documentId = ingestDocument(indexName, iplocationPipelineName, sourceField, "103.134.48.0");
134139
GetResponse getResponse = client().get(new GetRequest(indexName, documentId)).actionGet();
135140
Map<String, Object> returnedSource = getResponse.getSource();
136141
assertNotNull(returnedSource);
137142
Object targetFieldValue = returnedSource.get(targetField);
138143
assertNotNull(targetFieldValue);
139-
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("OAKLAWN JOCKEY CLUB, INC."));
144+
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("PT Nevigate Telekomunikasi Indonesia"));
140145
});
141146
}
142147

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,6 @@ tests:
193193
- class: org.elasticsearch.xpack.restart.CoreFullClusterRestartIT
194194
method: testSnapshotRestore {cluster=UPGRADED}
195195
issue: https://github.com/elastic/elasticsearch/issues/111799
196-
- class: org.elasticsearch.ingest.geoip.EnterpriseGeoIpDownloaderIT
197-
method: testEnterpriseDownloaderTask
198-
issue: https://github.com/elastic/elasticsearch/issues/115163
199196
- class: org.elasticsearch.xpack.deprecation.DeprecationHttpIT
200197
method: testDeprecatedSettingsReturnWarnings
201198
issue: https://github.com/elastic/elasticsearch/issues/108628

0 commit comments

Comments
 (0)