Skip to content

Commit

Permalink
test: up the ratelimit tests to 1000ms
Browse files Browse the repository at this point in the history
This fails too often on the gitlab runners, so let's expand the times.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
whot committed Feb 3, 2019
1 parent 6a720eb commit fbe7abf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test-misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,8 @@ START_TEST(ratelimit_helpers)
struct ratelimit rl;
unsigned int i, j;

/* 10 attempts every 100ms */
ratelimit_init(&rl, ms2us(500), 10);
/* 10 attempts every 1000ms */
ratelimit_init(&rl, ms2us(1000), 10);

for (j = 0; j < 3; ++j) {
/* a burst of 9 attempts must succeed */
Expand Down Expand Up @@ -731,8 +731,8 @@ START_TEST(ratelimit_helpers)
RATELIMIT_EXCEEDED);
}

/* but after 500ms the counter is reset */
msleep(450); /* +50ms to account for time drifts */
/* but after 1000ms the counter is reset */
msleep(950); /* +50ms to account for time drifts */
}
}
END_TEST
Expand Down

0 comments on commit fbe7abf

Please sign in to comment.