Skip to content

Test test_is_healthy_bad_route hangs #253

@sanders41

Description

@sanders41

I noticed that the test_is_healthy_bad_route test can hang the test suite for several minutes while it waits for the request to time out. There is nothing wrong with the test itself, the issue is requests takes a long time to timeout.

The hanging issue in this test can be solved by either setting the timeout to 1 (or some other low number) in the client or by patching requests to return the error right away. Is there any interest in implementing one of these options, and if so which would be the preference? I'm happy to open a PR for either option if you like the idea.

def test_is_healthy_bad_route():
"""Tests checking if is_healthy returns false when trying to reach a bad URL."""
client = meilisearch.Client("http://wrongurl:1234")
response = client.is_healthy()
assert response is False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions