From 67ced0d0b9f1725b150721156481abc86fee3020 Mon Sep 17 00:00:00 2001 From: zhichao-aws Date: Thu, 28 Sep 2023 02:25:15 +0800 Subject: [PATCH] Fix flaky integ test caused by latency of undeploy model (#345) * add 3s sleep before delete model Signed-off-by: zhichao-aws * remove print stack trace Signed-off-by: zhichao-aws --------- Signed-off-by: zhichao-aws --- .../org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java b/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java index 84672d479..37733adbf 100644 --- a/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java +++ b/src/test/java/org/opensearch/neuralsearch/common/BaseNeuralSearchIT.java @@ -550,6 +550,9 @@ protected void deleteModel(String modelId) { ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, DEFAULT_USER_AGENT)) ); + // after model undeploy returns, the max interval to update model status is 3s in ml-commons CronJob. + Thread.sleep(3000); + makeRequest( client(), "DELETE",