Throttle may take longer than .10s on slow machines

This made this test fluky on windows CI ...
This commit is contained in:
Matthias 2020-03-05 06:20:36 +01:00
parent 57523d58df
commit 97b194a454
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ def test_throttle(mocker, default_conf, caplog) -> None:
assert result == 42
assert end - start > 0.1
assert log_has_re(r"Throttling with 'throttled_func\(\)': sleep for 0\.10 s.*", caplog)
assert log_has_re(r"Throttling with 'throttled_func\(\)': sleep for \d\.\d{2} s.*", caplog)
result = worker._throttle(throttled_func, throttle_secs=-1)
assert result == 42