From: Timo Sirainen Date: Thu, 2 Jan 2020 18:20:24 +0000 (+0200) Subject: stats: Make sure unit tests don't fail with fast CPUs X-Git-Tag: 2.3.10~170 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f99a609b9ee2ebdb2216b5b3a8488b5158ca0435;p=thirdparty%2Fdovecot%2Fcore.git stats: Make sure unit tests don't fail with fast CPUs --- diff --git a/src/stats/test-stats-common.c b/src/stats/test-stats-common.c index 4e55de0cb2..f6e8f290ac 100644 --- a/src/stats/test-stats-common.c +++ b/src/stats/test-stats-common.c @@ -1,6 +1,7 @@ /* Copyright (c) 2019 Dovecot authors, see the included COPYING file */ #include "test-stats-common.h" +#include struct event_category test_category = { .name = "test", @@ -65,6 +66,7 @@ void test_event_send(struct event *event) .type = LOG_TYPE_DEBUG, }; + usleep(1); /* make sure duration>0 always */ event_send(event, &ctx, "hello"); }