aboutsummaryrefslogtreecommitdiffstats
path: root/messagebus/src/tests/replygate
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2023-03-08 08:45:54 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2023-03-08 08:45:54 +0000
commit66ae46c80878aab4b0fc19d4c693e1a74cd8977a (patch)
treef2211ceae2fe5137d130363c8db8edc2dd6e0d15 /messagebus/src/tests/replygate
parent0d234088e4cace78188d71e599c2c1e48d30321a (diff)
use ref_counted for ReplyGate
Diffstat (limited to 'messagebus/src/tests/replygate')
-rw-r--r--messagebus/src/tests/replygate/replygate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/messagebus/src/tests/replygate/replygate.cpp b/messagebus/src/tests/replygate/replygate.cpp
index 3de48fce130..c71993c9368 100644
--- a/messagebus/src/tests/replygate/replygate.cpp
+++ b/messagebus/src/tests/replygate/replygate.cpp
@@ -59,7 +59,7 @@ TEST("replygate_test") {
{
RoutableQueue q;
MySender sender;
- MyGate *gate = new MyGate(sender);
+ auto gate = vespalib::make_ref_counted<MyGate>(sender);
{
auto msg = std::make_unique<SimpleMessage>("test");
msg->pushHandler(q);
@@ -79,7 +79,7 @@ TEST("replygate_test") {
EXPECT_TRUE(MyReply::dtorCnt == 1);
EXPECT_TRUE(MyGate::ctorCnt == 1);
EXPECT_TRUE(MyGate::dtorCnt == 0);
- gate->subRef();
+ gate = vespalib::ref_counted<MyGate>();
EXPECT_TRUE(MyGate::ctorCnt == 1);
EXPECT_TRUE(MyGate::dtorCnt == 1);
}