mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
tests: Fix random failure on too fast systems
On mingw we are frequently getting a failure like this: [ ERROR ] --- 451 is not within the range 1-450 This means the 50ms sleep did not manage to elapse the 50ms in the timeout structure. Extending the range to 460 will give use more wiggle room if the clock is not as it should be. Related: #273 Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -355,7 +355,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,500),1,450);
|
||||
assert_in_range(ssh_timeout_update(&ts,500),1,460);
|
||||
assert_int_equal(ssh_timeout_update(&ts,0),0);
|
||||
assert_int_equal(ssh_timeout_update(&ts,-1),-1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user