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/zenserver-test/zenserver-test.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/zenserver-test/zenserver-test.cpp') diff --git a/src/zenserver-test/zenserver-test.cpp b/src/zenserver-test/zenserver-test.cpp index cf7ffe4e4..d713f693f 100644 --- a/src/zenserver-test/zenserver-test.cpp +++ b/src/zenserver-test/zenserver-test.cpp @@ -199,7 +199,7 @@ TEST_CASE("default.single") HttpClient Http{fmt::format("http://localhost:{}", PortNumber)}; - for (int i = 0; i < 100; ++i) + for (int i = 0; i < 20; ++i) { auto res = Http.Get("/test/hello"sv); ++RequestCount; @@ -238,7 +238,6 @@ TEST_CASE("default.loopback") ZEN_INFO("Running loopback server test..."); - SUBCASE("ipv4 endpoint connectivity") { HttpClient Http{fmt::format("http://127.0.0.1:{}", PortNumber)}; @@ -247,7 +246,6 @@ TEST_CASE("default.loopback") CHECK(res); } - SUBCASE("ipv6 endpoint connectivity") { HttpClient Http{fmt::format("http://[::1]:{}", PortNumber)}; @@ -287,7 +285,7 @@ TEST_CASE("multi.basic") HttpClient Http{fmt::format("http://localhost:{}", PortNumber)}; - for (int i = 0; i < 100; ++i) + for (int i = 0; i < 20; ++i) { auto res = Http.Get("/test/hello"sv); ++RequestCount; @@ -401,13 +399,11 @@ TEST_CASE("http.unixsocket") Settings.UnixSocketPath = SocketPath; HttpClient Http{fmt::format("http://localhost:{}", PortNumber), Settings, {}}; - SUBCASE("GET over unix socket") { HttpClient::Response Res = Http.Get("/testing/hello"); CHECK(Res.IsSuccess()); } - SUBCASE("POST echo over unix socket") { IoBuffer Body{IoBuffer::Wrap, "unix-test", 9}; HttpClient::Response Res = Http.Post("/testing/echo", Body); @@ -431,13 +427,11 @@ TEST_CASE("http.nonetwork") Settings.UnixSocketPath = SocketPath; HttpClient Http{fmt::format("http://localhost:{}", PortNumber), Settings, {}}; - SUBCASE("GET over unix socket succeeds") { HttpClient::Response Res = Http.Get("/testing/hello"); CHECK(Res.IsSuccess()); } - SUBCASE("TCP connection is refused") { asio::io_context IoContext; asio::ip::tcp::socket Socket(IoContext); -- cgit v1.2.3