From 9e6999f53c91ec44d04ef6685dd97800e1a66306 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Fri, 10 Apr 2026 16:59:16 +0200 Subject: reduce test runtime (#933) * reduce zenserver spawns in tests * fix filesystemutils wrong test suite name * tweak tests for faster runtime * reduce more test runtime * more wall time improvements * fast http and processmanager tests --- src/zenutil/consul/consul.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/zenutil/consul/consul.cpp') diff --git a/src/zenutil/consul/consul.cpp b/src/zenutil/consul/consul.cpp index c9884ea61..430ad0e32 100644 --- a/src/zenutil/consul/consul.cpp +++ b/src/zenutil/consul/consul.cpp @@ -689,7 +689,7 @@ TEST_CASE("util.consul.service_lifecycle") REQUIRE(Client.RegisterService(Info)); REQUIRE(Client.HasService(ServiceId)); - REQUIRE(WaitForCondition([&]() { return HealthServer.Mock.HealthCheckCount.load() >= 1; }, 10000)); + REQUIRE(WaitForCondition([&]() { return HealthServer.Mock.HealthCheckCount.load() >= 1; }, 10000, 50)); CHECK(HealthServer.Mock.HealthCheckCount.load() >= 1); CHECK_EQ(GetCheckStatus(Client, ServiceId), "passing"); @@ -709,13 +709,13 @@ TEST_CASE("util.consul.service_lifecycle") CHECK_EQ(HealthServer.Mock.HealthCheckCount.load(), 0); CHECK_EQ(GetCheckStatus(Client, ServiceId), "passing"); - REQUIRE(WaitForCondition([&]() { return HealthServer.Mock.HealthCheckCount.load() >= 1; }, 10000)); + REQUIRE(WaitForCondition([&]() { return HealthServer.Mock.HealthCheckCount.load() >= 1; }, 10000, 50)); CHECK_EQ(GetCheckStatus(Client, ServiceId), "passing"); HealthServer.Mock.FailHealth.store(true); // Wait for Consul to observe the failing check - REQUIRE(WaitForCondition([&]() { return GetCheckStatus(Client, ServiceId) == "critical"; }, 10000)); + REQUIRE(WaitForCondition([&]() { return GetCheckStatus(Client, ServiceId) == "critical"; }, 10000, 50)); CHECK_EQ(GetCheckStatus(Client, ServiceId), "critical"); // Phase 4: Explicit deregister while critical -- cgit v1.2.3