From f99a609b9ee2ebdb2216b5b3a8488b5158ca0435 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 2 Jan 2020 20:20:24 +0200 Subject: [PATCH] stats: Make sure unit tests don't fail with fast CPUs --- src/stats/test-stats-common.c | 2 ++ 1 file changed, 2 insertions(+) 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"); } -- 2.47.3