summaryrefslogtreecommitdiffstats
path: root/slobrok
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-06-28 13:12:41 +0000
committerArne Juul <arnej@verizonmedia.com>2021-06-28 13:12:41 +0000
commit82e9e52b1645eb49e78f312c5ee38d5b424cda42 (patch)
treef5d3350613f31f1ffe6d9cf111f68b2cc0c0e43d /slobrok
parent251680579642fff527f0f7ca3f5b852a695ace29 (diff)
check cancel() return value also
Diffstat (limited to 'slobrok')
-rw-r--r--slobrok/src/tests/service_map_history/service_map_history_test.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/slobrok/src/tests/service_map_history/service_map_history_test.cpp b/slobrok/src/tests/service_map_history/service_map_history_test.cpp
index 486a5d7b9cb..e88f326a99b 100644
--- a/slobrok/src/tests/service_map_history/service_map_history_test.cpp
+++ b/slobrok/src/tests/service_map_history/service_map_history_test.cpp
@@ -183,6 +183,8 @@ TEST(ServiceMapHistoryTest, handlers_test) {
EXPECT_EQ(handler1.got_gen, GenCnt(1));
EXPECT_EQ(handler1.got_removes, 0ul);
EXPECT_EQ(handler1.got_updates, 0ul);
+ bool cantCancel = p.cancel(&handler1);
+ EXPECT_FALSE(cantCancel);
handler1.got_update = false;
p.update(ServiceMapping{"foo", "bar"});
@@ -206,7 +208,8 @@ TEST(ServiceMapHistoryTest, handlers_test) {
EXPECT_FALSE(handler4.got_update);
p.asyncGenerationDiff(&handler5, GenCnt(3));
EXPECT_FALSE(handler5.got_update);
- p.cancel(&handler4);
+ bool couldCancel = p.cancel(&handler4);
+ EXPECT_TRUE(couldCancel);
handler1.got_update = false;
handler2.got_update = false;