Skip to content

Commit a478b5f

Browse files
authored
Fix GeoIpProcessorNonIngestNodeIT#testLazyLoading(...) (#71579)
Ensure that the index request is routed to the ingest, so that the lazy loading occurs of geoip database on ingest node (which is what is asserted later on) Otherwise the database is lazy loaded on a different node. (without this fix, this test fails reproducible with `-Dtests.seed=2E234CC71CE96F4F`) Closes #71251
1 parent 0f40889 commit a478b5f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
package org.elasticsearch.ingest.geoip;
1010

1111
import org.apache.lucene.util.Constants;
12-
import org.apache.lucene.util.LuceneTestCase;
1312
import org.elasticsearch.action.index.IndexRequest;
1413
import org.elasticsearch.action.index.IndexResponse;
1514
import org.elasticsearch.action.ingest.PutPipelineRequest;
@@ -30,7 +29,6 @@
3029
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
3130
import static org.hamcrest.Matchers.equalTo;
3231

33-
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/71251")
3432
public class GeoIpProcessorNonIngestNodeIT extends AbstractGeoIpIT {
3533

3634
@Override
@@ -103,7 +101,7 @@ public void testLazyLoading() throws IOException {
103101
final IndexRequest indexRequest = new IndexRequest("index");
104102
indexRequest.setPipeline("geoip");
105103
indexRequest.source(Collections.singletonMap("ip", "1.1.1.1"));
106-
final IndexResponse indexResponse = client().index(indexRequest).actionGet();
104+
final IndexResponse indexResponse = client(ingestNode).index(indexRequest).actionGet();
107105
assertThat(indexResponse.status(), equalTo(RestStatus.CREATED));
108106
// now the geo-IP database should be loaded on the ingest node
109107
assertDatabaseLoadStatus(ingestNode, true);

0 commit comments

Comments
 (0)