/* Copyright (c) 2016-2018 Dovecot authors, see the included COPYING file */
#include "test-lib.h"
#include "ioloop.h"
#include "log-throttle.h"
static unsigned int test_log_throttle_new_events_count;
{
}
void test_log_throttle(void)
{
.throttle_at_max_per_interval = 10,
.interval_msecs = 10,
};
unsigned int i;
test_begin("log throttle");
ioloop = io_loop_create();
/* throttle once and drop out just below */
for (i = 0; i < 10; i++)
for (i = 0; i < 4; i++)
/* throttle and continue just above */
for (i = 0; i < 10; i++)
for (i = 0; i < 5; i++)
/* we should be still throttled */
test_end();
}