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