Skip to content

Commit

Permalink
Add run_count to smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
natoverse committed Feb 14, 2025
1 parent 96219a2 commit abe1b0e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/fixtures/text/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,6 @@
"method": "basic"
}
],
"slow": false
"slow": false,
"run_count": 2
}
7 changes: 6 additions & 1 deletion tests/smoke/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ def test_fixture(
input_file_type: str,
workflow_config: dict[str, dict[str, Any]],
query_config: list[dict[str, str]],
run_count: int = 1,
):
if workflow_config.get("skip"):
print(f"skipping smoke test {input_path})")
Expand All @@ -273,7 +274,11 @@ def test_fixture(
dispose = asyncio.run(prepare_azurite_data(input_path, azure))

print("running indexer")
self.__run_indexer(root, input_file_type)
# run the indexer more than once if requested - subsequent runs should use the cache
# this verifies that cache behavior is stable
for i in range(run_count):
print(f"run {i + 1} of {run_count}")
self.__run_indexer(root, input_file_type)
print("indexer complete")

if dispose is not None:
Expand Down

0 comments on commit abe1b0e

Please sign in to comment.