From d36aba2e2f2816d03619fae819dc41f55d1a43ce Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Fri, 11 Aug 2023 17:07:17 -0500 Subject: [PATCH] Fix assertions in GeoIpDownloaderIT.testGeoIpDatabasesDownloadNoGeoipProcessors() (#98413) --- .../org/elasticsearch/ingest/geoip/GeoIpDownloaderIT.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderIT.java b/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderIT.java index 26469b1c8d9cc..ad1aad39ac462 100644 --- a/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderIT.java +++ b/modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/GeoIpDownloaderIT.java @@ -272,13 +272,11 @@ public void testGeoIpDatabasesDownloadNoGeoipProcessors() throws Exception { assertBusy(() -> { PersistentTasksCustomMetadata.PersistentTask task = getTask(); assertNotNull(task); - assertNull(task.getState()); - putGeoIpPipeline(); // This is to work around the race condition described in #92888 + assertNotNull(task.getState()); + putGeoIpPipeline(pipelineId); // This is to work around the race condition described in #92888 }); putNonGeoipPipeline(pipelineId); - assertBusy(() -> { assertNull(getTask().getState()); }); - putNonGeoipPipeline(pipelineId); - assertNull(getTask().getState()); + assertNotNull(getTask().getState()); // removing all geoip processors should not result in the task being stopped putGeoIpPipeline(); assertBusy(() -> { GeoIpTaskState state = getGeoIpTaskState();