Skip to content

Commit c464988

Browse files
Bornunique911northdpole
authored andcommitted
test: make retry behavior deterministic in upstream fetch test
1 parent 651ff38 commit c464988

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

application/tests/cre_main_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,9 @@ def test_fetch_upstream_json_retries_transient_failures(
482482
success_response.json.return_value = {"data": []}
483483
mock_get.side_effect = [transient_error, success_response]
484484

485-
data = main.fetch_upstream_json("/root_cres")
485+
# Make retry behaviour deterministic for the test by passing explicit
486+
# retry settings instead of relying on environment defaults.
487+
data = main.fetch_upstream_json("/root_cres", max_attempts=2, backoff_seconds=1)
486488

487489
self.assertEqual(data, {"data": []})
488490
self.assertEqual(mock_get.call_count, 2)

0 commit comments

Comments
 (0)