|
35 | 35 | import org.elasticsearch.reindex.ReindexPlugin; |
36 | 36 | import org.elasticsearch.rest.RestStatus; |
37 | 37 | import org.elasticsearch.test.ESIntegTestCase; |
| 38 | +import org.elasticsearch.test.junit.annotations.TestLogging; |
38 | 39 | import org.elasticsearch.transport.RemoteTransportException; |
39 | 40 | import org.elasticsearch.xcontent.XContentType; |
40 | 41 | import org.junit.ClassRule; |
@@ -87,6 +88,10 @@ protected Collection<Class<? extends Plugin>> nodePlugins() { |
87 | 88 | } |
88 | 89 |
|
89 | 90 | @SuppressWarnings("unchecked") |
| 91 | + @TestLogging( |
| 92 | + reason = "understanding why ipinfo asn database sometimes is not loaded", |
| 93 | + value = "org.elasticsearch.ingest.geoip.DatabaseNodeService:TRACE" |
| 94 | + ) |
90 | 95 | public void testEnterpriseDownloaderTask() throws Exception { |
91 | 96 | /* |
92 | 97 | * 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 { |
121 | 126 | assertNotNull(returnedSource); |
122 | 127 | Object targetFieldValue = returnedSource.get(targetField); |
123 | 128 | 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")); |
125 | 130 | }); |
126 | 131 | assertBusy(() -> { |
127 | 132 | 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"); |
129 | 134 | GetResponse getResponse = client().get(new GetRequest(indexName, documentId)).actionGet(); |
130 | 135 | Map<String, Object> returnedSource = getResponse.getSource(); |
131 | 136 | assertNotNull(returnedSource); |
132 | 137 | Object targetFieldValue = returnedSource.get(targetField); |
133 | 138 | 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")); |
135 | 140 | }); |
136 | 141 | } |
137 | 142 |
|
|
0 commit comments