Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,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.XContentType;
import org.junit.ClassRule;
Expand Down Expand Up @@ -87,6 +88,10 @@ protected Collection<Class<? extends Plugin>> 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
Expand Down Expand Up @@ -121,17 +126,17 @@ public void testEnterpriseDownloaderTask() throws Exception {
assertNotNull(returnedSource);
Object targetFieldValue = returnedSource.get(targetField);
assertNotNull(targetFieldValue);
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("Bredband2 AB"));
assertThat(((Map<String, Object>) 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<String, Object> returnedSource = getResponse.getSource();
assertNotNull(returnedSource);
Object targetFieldValue = returnedSource.get(targetField);
assertNotNull(targetFieldValue);
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("OAKLAWN JOCKEY CLUB, INC."));
assertThat(((Map<String, Object>) targetFieldValue).get("organization_name"), equalTo("PT Nevigate Telekomunikasi Indonesia"));
});
}

Expand Down
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ tests:
- class: org.elasticsearch.xpack.apmdata.APMYamlTestSuiteIT
method: test {yaml=/10_apm/Test template reinstallation}
issue: https://github.com/elastic/elasticsearch/issues/116445
- class: org.elasticsearch.ingest.geoip.EnterpriseGeoIpDownloaderIT
method: testEnterpriseDownloaderTask
issue: https://github.com/elastic/elasticsearch/issues/115163
- class: org.elasticsearch.versioning.ConcurrentSeqNoVersioningIT
method: testSeqNoCASLinearizability
issue: https://github.com/elastic/elasticsearch/issues/117249
Expand Down