From 848ec218ce571a285c079c840b6fe4c4aef66b08 Mon Sep 17 00:00:00 2001 From: zane-neo Date: Fri, 29 Sep 2023 01:52:25 +0800 Subject: [PATCH] [Backport to 2.x] Fix flaky integ test caused by latency of undeploy model (#345) (#352) Signed-off-by: zane-neo --- .../opensearch/neuralsearch/common/BaseNeuralSearchIT.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java b/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java index 77af8e85d..7267d5243 100644 --- a/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java +++ b/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java @@ -576,7 +576,10 @@ protected void deleteModel(String modelId) { toHttpEntity(""), ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, DEFAULT_USER_AGENT)) ); - Thread.sleep(DEFAULT_TASK_RESULT_QUERY_INTERVAL_IN_MILLISECOND); + + // after model undeploy returns, the max interval to update model status is 3s in ml-commons CronJob. + Thread.sleep(3000); + makeRequest( client(), "DELETE",