From 27bf22fcdaa81a822673f784770c39282896add1 Mon Sep 17 00:00:00 2001 From: saimedhi Date: Thu, 21 Mar 2024 16:39:01 -0700 Subject: [PATCH] Modified generator to generate plugins Signed-off-by: saimedhi --- test_opensearchpy/test_server/test_plugins/test_knn.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test_opensearchpy/test_server/test_plugins/test_knn.py b/test_opensearchpy/test_server/test_plugins/test_knn.py index c46fba59..2c35b0c2 100644 --- a/test_opensearchpy/test_server/test_plugins/test_knn.py +++ b/test_opensearchpy/test_server/test_plugins/test_knn.py @@ -85,11 +85,12 @@ def test_knn_model(self) -> None: # Fetch the model state try: - response = self.client.plugins.knn.get_model(model_id=model_id, filter_path='state')['state'] + response = self.client.plugins.knn.get_model(model_id='my-model') if response['state'] != 'training': pass - except Exception as e: - print(f"Error fetching knn model: {e}") + except Exception as error: + print(f"Error fetching knn model: {error}") + break # Sleep for 1 minute before the next attempt time.sleep(10)