Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] test_search fails when there are no tasks #326

Closed
rawwar opened this issue Oct 31, 2023 · 0 comments · Fixed by #330
Closed

[BUG] test_search fails when there are no tasks #326

rawwar opened this issue Oct 31, 2023 · 0 comments · Fixed by #330
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@rawwar
Copy link
Contributor

rawwar commented Oct 31, 2023

test_search in ml_commons tests fail when there are no tasks in the cluster. Test case needs to be updated.

def test_search():
        # Search task cases
        raised = False
        try:
            search_task_obj = ml_client.search_task(
                input_json='{"query": {"match_all": {}},"size": 1}'
            )
            assert search_task_obj["hits"]["hits"] != []
        except:  # noqa: E722
            raised = True
>       assert raised == False, "Raised Exception in searching task"
E       AssertionError: Raised Exception in searching task
E       assert True == False

tests/ml_commons/test_ml_commons_client.py:113: AssertionError
------------------------------ Captured log call -------------------------------
WARNING  opensearch:base.py:259 GET https://instance:9200/_plugins/_ml/tasks/_search [status:404 request:0.015s]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment