Skip to content

Commit

Permalink
DummyNode: merge pubSubBulk and unsubscribeBulk
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidB137 committed Sep 16, 2024
1 parent 71702ed commit fc1edd1
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions test/include/kvik_testing/dummy_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,15 @@ namespace kvik
using INode::getMsgId;
using INode::INode;
using INode::validateMsgId;
using INode::validateMsgTimestamp;

ErrCode pubSubBulk(const std::vector<PubData> &newPubs,
const std::vector<SubReq> &newSubs)
ErrCode pubSubUnsubBulk(const std::vector<PubData> &newPubs,
const std::vector<SubReq> &newSubs,
const std::vector<std::string> &newUnsubs)
{
pubsLog.insert(pubsLog.end(), newPubs.begin(), newPubs.end());
subsLog.insert(subsLog.end(), newSubs.begin(), newSubs.end());
return ErrCode::SUCCESS;
}

ErrCode unsubscribeBulk(const std::vector<std::string> &topics)
{
unsubsLog.insert(unsubsLog.end(), topics.begin(), topics.end());
unsubsLog.insert(unsubsLog.end(), newUnsubs.begin(), newUnsubs.end());
return ErrCode::SUCCESS;
}

Expand Down

0 comments on commit fc1edd1

Please sign in to comment.