mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-02 09:35:55 +00:00
Fix: Duplicate messages when subscribe both accounts and proposed_accounts (#1415)
Fix #1134
This commit is contained in:
@@ -444,6 +444,22 @@ TEST_F(SubscriptionSourceReadTests, GotTransactionIsForwardingTrue)
|
||||
ioContext_.run();
|
||||
}
|
||||
|
||||
TEST_F(SubscriptionSourceReadTests, GotTransactionWithMetaIsForwardingFalse)
|
||||
{
|
||||
subscriptionSource_.setForwarding(true);
|
||||
boost::json::object const message = {{"transaction", "some_transaction_data"}, {"meta", "some_meta_data"}};
|
||||
|
||||
boost::asio::spawn(ioContext_, [&message, this](boost::asio::yield_context yield) {
|
||||
auto connection = connectAndSendMessage(boost::json::serialize(message), yield);
|
||||
connection.close(yield);
|
||||
});
|
||||
|
||||
EXPECT_CALL(onConnectHook_, Call());
|
||||
EXPECT_CALL(onDisconnectHook_, Call()).WillOnce([this]() { subscriptionSource_.stop(); });
|
||||
EXPECT_CALL(*subscriptionManager_, forwardProposedTransaction(message)).Times(0);
|
||||
ioContext_.run();
|
||||
}
|
||||
|
||||
TEST_F(SubscriptionSourceReadTests, GotValidationReceivedIsForwardingFalse)
|
||||
{
|
||||
boost::asio::spawn(ioContext_, [this](boost::asio::yield_context yield) {
|
||||
|
||||
Reference in New Issue
Block a user