mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
WebSocket test is deterministic
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
* WebSocket test is deterministic.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Version 313:
|
||||
|
||||
* Fix incorrect websocket test ordering.
|
||||
|
@ -108,16 +108,17 @@ struct timer_test : unit_test::suite
|
||||
ioc.restart();
|
||||
|
||||
flat_buffer b;
|
||||
error_code ec1, ec2;
|
||||
error_code ec2;
|
||||
ws1.async_close({},
|
||||
[&ec2](error_code ec)
|
||||
{
|
||||
ec2 = ec;
|
||||
});
|
||||
ioc.run();
|
||||
BEAST_EXPECT(
|
||||
ec1 == beast::error::timeout ||
|
||||
ec2 == beast::error::timeout);
|
||||
BEAST_EXPECTS(
|
||||
ec2 == beast::error::timeout ||
|
||||
ec2 == net::error::operation_aborted,
|
||||
ec2.message());
|
||||
}
|
||||
{
|
||||
net::io_context ioc;
|
||||
@ -186,8 +187,8 @@ struct timer_test : unit_test::suite
|
||||
void
|
||||
run() override
|
||||
{
|
||||
testIdlePing();
|
||||
testIssue1729();
|
||||
testIdlePing();
|
||||
testCloseWhileRead();
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user