From: Duncan Bellamy Date: Thu, 11 Jun 2026 18:37:18 +0000 (+0100) Subject: [Fix] unit test checks upstream rate limit state using a custom fake_clock X-Git-Tag: 4.1.1~22^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=104eecd3b2d6546f0167fdab754ee17391764f57;p=thirdparty%2Frspamd.git [Fix] unit test checks upstream rate limit state using a custom fake_clock under a mock environment where the event loop (ev_run()) is never actually executed. --- diff --git a/test/rspamd_test_fake_time.hxx b/test/rspamd_test_fake_time.hxx index 2aa7704528..627849314a 100644 --- a/test/rspamd_test_fake_time.hxx +++ b/test/rspamd_test_fake_time.hxx @@ -70,11 +70,17 @@ public: seconds = 0.0; } now_ += seconds; + if (loop_) { + ev_now_resync(loop_); + } } void set(double t) { now_ = t; + if (loop_) { + ev_now_resync(loop_); + } } double now() const