mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 02:20:30 +01:00
test: misc: up the time limit on the ratelimit tests
I keep hitting this in the gitlab runner, 100ms is clearly not enough here for slow containers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
2192ec192c
commit
b469368790
1 changed files with 4 additions and 4 deletions
|
|
@ -701,7 +701,7 @@ START_TEST(ratelimit_helpers)
|
|||
unsigned int i, j;
|
||||
|
||||
/* 10 attempts every 100ms */
|
||||
ratelimit_init(&rl, ms2us(100), 10);
|
||||
ratelimit_init(&rl, ms2us(500), 10);
|
||||
|
||||
for (j = 0; j < 3; ++j) {
|
||||
/* a burst of 9 attempts must succeed */
|
||||
|
|
@ -723,14 +723,14 @@ START_TEST(ratelimit_helpers)
|
|||
}
|
||||
|
||||
/* ..even after waiting 20ms */
|
||||
msleep(20);
|
||||
msleep(100);
|
||||
for (i = 0; i < 100; ++i) {
|
||||
ck_assert_int_eq(ratelimit_test(&rl),
|
||||
RATELIMIT_EXCEEDED);
|
||||
}
|
||||
|
||||
/* but after 100ms the counter is reset */
|
||||
msleep(90); /* +10ms to account for time drifts */
|
||||
/* but after 500ms the counter is reset */
|
||||
msleep(450); /* +50ms to account for time drifts */
|
||||
}
|
||||
}
|
||||
END_TEST
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue