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

test_tag_sort fails sometimes #772

Open
keithmanville opened this issue Feb 27, 2025 · 0 comments
Open

test_tag_sort fails sometimes #772

keithmanville opened this issue Feb 27, 2025 · 0 comments
Assignees

Comments

@keithmanville
Copy link
Collaborator

keithmanville commented Feb 27, 2025

The test_tag_sort is inconsistent and fails some times.

I suspect it may fail when no sort criteria is provided and we can't expect a specific order ( the (None, None, ["tag1", "tag2", "tag3"]) case below).

    @pytest.mark.parametrize(
        "sort_by, descending , expected",
        [
            (None, None, ["tag1", "tag2", "tag3"]),
            ("name", True, ["tag2", "tag1", "tag3"]),
            ("name", False, ["tag3", "tag1", "tag2"]),
            ("createdOn", True, ["tag3", "tag2", "tag1"]),
            ("createdOn", False, ["tag1", "tag2", "tag3"]),
        ],
    )
    def test_tag_sort(
    ...

I think Andy encountered something similar here with the returned order of Queues:

# A sort order was not given in the request, so we must not assume a

Since we don't have a guarantee on the returned order, the test should only check that the correct tags are present and not assume an order.

Currently known tests that check based on order but don't specify one are: Queue Retrieval, Queue Sort (with None, None for sort field and order) and Tags Sort (with None None for sort and order). As part of this issue, check tests the look based on sort_by and do not provide a field and any tests that perform retrieval and check based on a python lists instead of a set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants