From b8f2691394aae5e4183828eacceca7e8a841713c Mon Sep 17 00:00:00 2001 From: Joshua152 <59714582+Joshua152@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:21:12 -0800 Subject: [PATCH] Sleep thread to allow jobs to finish (#1066) Signed-off-by: Joshua Au --- .../indexstatemanagement/resthandler/RestExplainActionIT.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestExplainActionIT.kt b/src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestExplainActionIT.kt index 5c91f9364..c0842adbf 100644 --- a/src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestExplainActionIT.kt +++ b/src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestExplainActionIT.kt @@ -500,6 +500,9 @@ class RestExplainActionIT : IndexStateManagementRestTestCase() { removePolicyFromIndex(indexName1) removePolicyFromIndex(indexName2) + + // wait for job to finish + Thread.sleep(1000) } fun `test explain filter failed index`() { @@ -607,6 +610,9 @@ class RestExplainActionIT : IndexStateManagementRestTestCase() { removePolicyFromIndex(indexName1) removePolicyFromIndex(indexName2) + + // wait for job to finish + Thread.sleep(1000) } @Suppress("UNCHECKED_CAST") // Do assertion of the response map here so we don't have many places to do suppression.