Skip to content

Commit

Permalink
fixup! ping: Make tests that verify current behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
xim committed Oct 4, 2023
1 parent 32780f1 commit 767a0ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/beast/websocket/ping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ class ping_test : public websocket_test_suite
});
// We are connected, base state
BEAST_EXPECT(ws.impl_->idle_counter == 0);
test::run_for(ioc_, std::chrono::milliseconds(750));
test::run_for(ioc_, std::chrono::milliseconds(740));
// After 600ms idle, no timeout
BEAST_EXPECT(ws.impl_->idle_counter == 1);
es.async_ping();
test::run_for(ioc_, std::chrono::milliseconds(250));
test::run_for(ioc_, std::chrono::milliseconds(240));
// The server sent a ping, and we haven't been idle long, so back to base state.
BEAST_EXPECT(ws.impl_->idle_counter == 0);
BEAST_EXPECT(!got_timeout);
Expand Down

0 comments on commit 767a0ee

Please sign in to comment.