[Fix] Increase _delete_file retry budget to reduce flakiness

Increase max_retries from 6 to 9 and retry_delay from 10s to 20s
(180s total wait, up from 60s) to give batch cost tracking more time
to finish before cleanup attempts file deletion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yuneng-jiang 2026-03-13 12:32:55 -07:00
parent 57865ec96e
commit 4e70254d56

View file

@ -205,7 +205,7 @@ class TestManagedFilesAPI(ManagedFilesBase, UserKeyTestMixin):
return metadata
def _delete_file(self, file_id, label, max_retries=6, retry_delay=10):
def _delete_file(self, file_id, label, max_retries=9, retry_delay=20):
print(f"\nDeleting {label}: {self.shorten_id(file_id)}")
for attempt in range(max_retries):
try: