From 684fbfb356b6cf326c4f4cfa0c0f4bba0e9efda8 Mon Sep 17 00:00:00 2001 From: Mohammad Nejati Date: Mon, 10 Feb 2025 20:26:04 +0000 Subject: [PATCH] Increase timeout tolerance in ping tests --- test/beast/websocket/ping.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/beast/websocket/ping.cpp b/test/beast/websocket/ping.cpp index 0349365c..ba706280 100644 --- a/test/beast/websocket/ping.cpp +++ b/test/beast/websocket/ping.cpp @@ -108,7 +108,7 @@ public: test::connect(ws1.next_layer(), ws2.next_layer()); ws1.set_option(stream_base::timeout{ stream_base::none(), - std::chrono::milliseconds(500), + std::chrono::seconds(1), false }); ws2.async_accept(test::success_handler()); @@ -125,13 +125,13 @@ public: system_error{ec}); got_timeout = true; }); - ioc.run_for(std::chrono::milliseconds(250)); + ioc.run_for(std::chrono::milliseconds(500)); ioc.restart(); ws2.async_ping("", test::success_handler()); - ioc.run_for(std::chrono::milliseconds(300)); + ioc.run_for(std::chrono::milliseconds(600)); ioc.restart(); BEAST_EXPECT(!got_timeout); - ioc.run_for(std::chrono::milliseconds(500)); + ioc.run_for(std::chrono::seconds(1)); ioc.restart(); BEAST_EXPECT(got_timeout); }