From d84135e9f17605b8f192ed88a6ea024f0995df1a Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Fri, 15 Sep 2017 09:49:46 +0000 Subject: Rename notifyPut to notifyPutDone since notification happens after data structures have been updated. --- .../gid_to_lid_change_handler_test.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp') diff --git a/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp b/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp index 1c5287f15e5..6aafb3217c7 100644 --- a/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp +++ b/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp @@ -53,7 +53,7 @@ public: EXPECT_EQUAL(_createdListeners, _destroyedListeners); } - void notifyPut() { + void notifyPutDone() { lock_guard guard(_lock); ++_putChanges; } @@ -101,7 +101,7 @@ public: _stats.markCreatedListener(); } virtual ~MyListener() { _stats.markDestroyedListener(); } - virtual void notifyPut(GlobalId, uint32_t) override { _stats.notifyPut(); } + virtual void notifyPutDone(GlobalId, uint32_t) override { _stats.notifyPutDone(); } virtual void notifyRemove(GlobalId) override { _stats.notifyRemove(); } virtual void notifyRegistered() override { _stats.markRegisteredListener(); } virtual const vespalib::string &getName() const override { return _name; } @@ -138,8 +138,8 @@ struct Fixture _handler->addListener(std::move(listener)); } - void notifyPut(GlobalId gid, uint32_t lid, SerialNum serialNum) { - _handler->notifyPut(gid, lid, serialNum); + void notifyPutDone(GlobalId gid, uint32_t lid, SerialNum serialNum) { + _handler->notifyPutDone(gid, lid, serialNum); } void notifyRemove(GlobalId gid, SerialNum serialNum) { @@ -164,7 +164,7 @@ TEST_F("Test that we can register a listener", Fixture) TEST_DO(stats.assertListeners(1, 0, 0)); f.addListener(std::move(listener)); TEST_DO(stats.assertListeners(1, 1, 0)); - f.notifyPut(toGid(doc1), 10, 10); + f.notifyPutDone(toGid(doc1), 10, 10); TEST_DO(stats.assertChanges(1, 0)); f.removeListeners("testdoc", {}); TEST_DO(stats.assertListeners(1, 1, 1)); @@ -187,7 +187,7 @@ TEST_F("Test that we can register multiple listeners", Fixture) TEST_DO(stats1.assertListeners(1, 1, 0)); TEST_DO(stats2.assertListeners(1, 1, 0)); TEST_DO(stats3.assertListeners(1, 1, 0)); - f.notifyPut(toGid(doc1), 10, 10); + f.notifyPutDone(toGid(doc1), 10, 10); TEST_DO(stats1.assertChanges(1, 0)); TEST_DO(stats2.assertChanges(1, 0)); TEST_DO(stats3.assertChanges(1, 0)); @@ -229,11 +229,11 @@ TEST_F("Test that put is ignored if we have a pending remove", Fixture) f.addListener(std::move(listener)); f.notifyRemove(toGid(doc1), 20); TEST_DO(stats.assertChanges(0, 1)); - f.notifyPut(toGid(doc1), 10, 10); + f.notifyPutDone(toGid(doc1), 10, 10); TEST_DO(stats.assertChanges(0, 1)); f.notifyRemoveDone(toGid(doc1), 20); TEST_DO(stats.assertChanges(0, 1)); - f.notifyPut(toGid(doc1), 11, 30); + f.notifyPutDone(toGid(doc1), 11, 30); TEST_DO(stats.assertChanges(1, 1)); f.removeListeners("testdoc", {}); } @@ -247,15 +247,15 @@ TEST_F("Test that pending removes are merged", Fixture) TEST_DO(stats.assertChanges(0, 1)); f.notifyRemove(toGid(doc1), 40); TEST_DO(stats.assertChanges(0, 1)); - f.notifyPut(toGid(doc1), 10, 10); + f.notifyPutDone(toGid(doc1), 10, 10); TEST_DO(stats.assertChanges(0, 1)); f.notifyRemoveDone(toGid(doc1), 20); TEST_DO(stats.assertChanges(0, 1)); - f.notifyPut(toGid(doc1), 11, 30); + f.notifyPutDone(toGid(doc1), 11, 30); TEST_DO(stats.assertChanges(0, 1)); f.notifyRemoveDone(toGid(doc1), 40); TEST_DO(stats.assertChanges(0, 1)); - f.notifyPut(toGid(doc1), 12, 50); + f.notifyPutDone(toGid(doc1), 12, 50); TEST_DO(stats.assertChanges(1, 1)); f.removeListeners("testdoc", {}); } -- cgit v1.2.3