Skip to content

Try to actually run Test Database Summary tests - rather than quitting early #2188

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

Merged
merged 3 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,17 @@ jobs:
- tests/mock_vws/test_content_length.py::TestIncorrect::test_not_integer
- tests/mock_vws/test_content_length.py::TestIncorrect::test_too_large
- tests/mock_vws/test_content_length.py::TestIncorrect::test_too_small
- tests/mock_vws/test_database_summary.py
- tests/mock_vws/test_database_summary.py::TestDatabaseSummary::test_success
- tests/mock_vws/test_database_summary.py::TestDatabaseSummary::test_active_images
- tests/mock_vws/test_database_summary.py::TestDatabaseSummary::test_failed_images
- tests/mock_vws/test_database_summary.py::TestDatabaseSummary::test_inactive_images
- tests/mock_vws/test_database_summary.py::TestDatabaseSummary::test_inactive_failed
- tests/mock_vws/test_database_summary.py::TestDatabaseSummary::test_deleted
- tests/mock_vws/test_database_summary.py::TestProcessingImages
- tests/mock_vws/test_database_summary.py::TestQuotas
- tests/mock_vws/test_database_summary.py::TestRecos
- tests/mock_vws/test_database_summary.py::TestRequestUsage
- tests/mock_vws/test_database_summary.py::TestInactiveProject
- tests/mock_vws/test_date_header.py::TestFormat
- tests/mock_vws/test_date_header.py::TestMissing
- tests/mock_vws/test_date_header.py::TestSkewedTime::test_date_out_of_range_after
Expand Down
17 changes: 3 additions & 14 deletions tests/mock_vws/test_database_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _wait_for_image_numbers(
processing_images: int,
) -> None:
"""
Wait up to 500 seconds (arbitrary, though we saw timeouts with 300 seconds)
Wait up to 700 seconds (arbitrary, though we saw timeouts with 500 seconds)
for the number of images in various categories to match the expected
number.

Expand Down Expand Up @@ -60,7 +60,7 @@ def _wait_for_image_numbers(
"processing_images": processing_images,
}

maximum_wait_seconds = 500
maximum_wait_seconds = 700
start_time = time.monotonic()

# If we wait for all requirements to match at the same time,
Expand Down Expand Up @@ -97,14 +97,6 @@ def _wait_for_image_numbers(

time.sleep(sleep_seconds)

# This break makes the entire test invalid.
# However, we have found that without this Vuforia is flaky.
# We have waited over 10 minutes for the summary to change and
# that is not sustainable in a test suite.
# That might be because we think some images will go into a particular
# state but they don't.
break


@pytest.mark.usefixtures("verify_mock_vuforia")
class TestDatabaseSummary:
Expand Down Expand Up @@ -132,10 +124,7 @@ def test_success(
)

@staticmethod
def test_active_images(
vws_client: VWS,
target_id: str,
) -> None:
def test_active_images(vws_client: VWS, target_id: str) -> None:
"""
The number of images in the active state is returned.
"""
Expand Down