Skip to content

Commit d602373

Browse files
committed
tests: integration: Process short-intervals to wait shortly in total
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
1 parent 4be562a commit d602373

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/integration/scenarios/out_s3/tests/test_out_s3_001.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,13 @@ def test_out_s3_default_retry_exhausted_action_quarantines_file():
234234

235235
service = Service("out_s3_retry_exhausted_default_quarantine.yaml")
236236
service.start()
237-
time.sleep(6)
237+
timeout = time.time() + 10
238+
files = []
239+
while time.time() < timeout:
240+
files = [p for p in glob.glob(f"{store_dir}/**", recursive=True) if os.path.isfile(p)]
241+
if len(files) > 0:
242+
break
243+
time.sleep(0.2)
238244
service.stop()
239245

240-
files = [p for p in glob.glob(f"{store_dir}/**", recursive=True) if os.path.isfile(p)]
241246
assert len(files) > 0

0 commit comments

Comments
 (0)