tests: Permit slow systems to take 1-450 instead of 1-40ms.

Thanks to Jakub Jelen for debugging and suggested fix.  Fixes #273.

Signed-off-by: Simon Josefsson <simon@josefsson.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit d29ed23010)
This commit is contained in:
Simon Josefsson
2024-10-21 15:38:13 +02:00
committed by Jakub Jelen
parent 7d35d25297
commit 1d157c57a3

View File

@@ -241,7 +241,7 @@ static void torture_timeout_update(void **state){
usleep(50000);
assert_int_equal(ssh_timeout_update(&ts,25), 0);
assert_in_range(ssh_timeout_update(&ts,30000),29000,29960);
assert_in_range(ssh_timeout_update(&ts,75),1,40);
assert_in_range(ssh_timeout_update(&ts,500),1,450);
assert_int_equal(ssh_timeout_update(&ts,0),0);
assert_int_equal(ssh_timeout_update(&ts,-1),-1);
}