Skip to content

Commit

Permalink
relax test timing
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Jun 8, 2023
1 parent d1be7d5 commit b4f2f09
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/bouncer/test_custom_bouncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_no_custom_binary(crowdsec, bouncer, cb_cfg_factory):
cb.wait_for_lines_fnmatch([
"*unable to load configuration: binary '/does/not/exist' doesn't exist*",
])
cb.proc.wait(timeout=0.2)
cb.proc.wait()
assert not cb.proc.is_running()


Expand All @@ -19,7 +19,7 @@ def test_no_api_key(crowdsec, bouncer, cb_stream_cfg_factory):
cb.wait_for_lines_fnmatch([
"*unable to configure bouncer: config does not contain LAPI key or certificate*",
])
cb.proc.wait(timeout=0.2)
cb.proc.wait()
assert not cb.proc.is_running()

cfg['api_key'] = ''
Expand All @@ -28,7 +28,7 @@ def test_no_api_key(crowdsec, bouncer, cb_stream_cfg_factory):
cb.wait_for_lines_fnmatch([
"*unable to configure bouncer: config does not contain LAPI key or certificate*",
])
cb.proc.wait(timeout=0.2)
cb.proc.wait()
assert not cb.proc.is_running()


Expand Down Expand Up @@ -58,7 +58,7 @@ def test_bad_api_key(crowdsec, bouncer, cb_stream_cfg_factory):
"*auth-api: auth with api key failed return nil response, error*",
"*bouncer stream halted*",
])
cb.proc.wait(timeout=0.5)
cb.proc.wait()
assert not cb.proc.is_running()


Expand Down Expand Up @@ -166,7 +166,7 @@ def test_binary_monitor(bouncer_with_lapi):
# This will exceed max_retry and the bouncer will stop
assert cb.proc.is_running()
cb.halt_children()
cb.proc.wait(timeout=0.5)
cb.proc.wait()
assert not cb.proc.is_running()
cb.wait_for_lines_fnmatch([
"*Binary exited (retry 3/3): signal: killed*",
Expand Down Expand Up @@ -227,7 +227,7 @@ def test_bin_args(bouncer_with_lapi, tmp_path_factory):
res = lapi.cont.exec_run(f'cscli decisions add -i 1.2.3.{i}')
assert res.exit_code == 0

time.sleep(1)
time.sleep(2)

with open(data) as f:
lines = f.readlines()
Expand Down

0 comments on commit b4f2f09

Please sign in to comment.