Skip to content

Commit abe1b0e

Browse files
committed
Add run_count to smoke tests
1 parent 96219a2 commit abe1b0e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/fixtures/text/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,6 @@
117117
"method": "basic"
118118
}
119119
],
120-
"slow": false
120+
"slow": false,
121+
"run_count": 2
121122
}

tests/smoke/test_fixtures.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ def test_fixture(
261261
input_file_type: str,
262262
workflow_config: dict[str, dict[str, Any]],
263263
query_config: list[dict[str, str]],
264+
run_count: int = 1,
264265
):
265266
if workflow_config.get("skip"):
266267
print(f"skipping smoke test {input_path})")
@@ -273,7 +274,11 @@ def test_fixture(
273274
dispose = asyncio.run(prepare_azurite_data(input_path, azure))
274275

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

279284
if dispose is not None:

0 commit comments

Comments
 (0)