diff options
Diffstat (limited to 'vespalib/src/tests')
-rw-r--r-- | vespalib/src/tests/datastore/sharded_hash_map/sharded_hash_map_test.cpp | 8 | ||||
-rw-r--r-- | vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/vespalib/src/tests/datastore/sharded_hash_map/sharded_hash_map_test.cpp b/vespalib/src/tests/datastore/sharded_hash_map/sharded_hash_map_test.cpp index 13f9ae251b6..d6970e20e8a 100644 --- a/vespalib/src/tests/datastore/sharded_hash_map/sharded_hash_map_test.cpp +++ b/vespalib/src/tests/datastore/sharded_hash_map/sharded_hash_map_test.cpp @@ -73,8 +73,8 @@ public: } ~MyCompactable() override = default; - EntryRef move(EntryRef ref) override { - auto new_ref = _allocator.move(ref); + EntryRef move_on_compact(EntryRef ref) override { + auto new_ref = _allocator.move_on_compact(ref); _allocator.hold(ref); _new_refs.emplace_back(new_ref); return new_ref; @@ -395,7 +395,7 @@ TEST_F(DataStoreShardedHashTest, foreach_key_works) } } -TEST_F(DataStoreShardedHashTest, move_keys_works) +TEST_F(DataStoreShardedHashTest, move_keys_on_compact_works) { populate_sample_data(small_population); std::vector<EntryRef> refs; @@ -403,7 +403,7 @@ TEST_F(DataStoreShardedHashTest, move_keys_works) std::vector<EntryRef> new_refs; MyCompactable my_compactable(_allocator, new_refs); auto filter = make_entry_ref_filter<RefT>(false); - _hash_map.move_keys(my_compactable, filter); + _hash_map.move_keys_on_compact(my_compactable, filter); std::vector<EntryRef> verify_new_refs; _hash_map.foreach_key([&verify_new_refs](EntryRef ref) { verify_new_refs.emplace_back(ref); }); EXPECT_EQ(small_population, refs.size()); diff --git a/vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp b/vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp index f68dd4dde66..0b34f587c6d 100644 --- a/vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp +++ b/vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp @@ -51,8 +51,8 @@ struct TestBase : public ::testing::Test { void remove(EntryRef ref) { allocator.hold(ref); } - EntryRef move(EntryRef ref) { - return allocator.move(ref); + EntryRef move_on_compact(EntryRef ref) { + return allocator.move_on_compact(ref); } uint32_t get_buffer_id(EntryRef ref) const { return EntryRefType(ref).bufferId(); @@ -104,7 +104,7 @@ TEST_F(StringTest, extra_bytes_used_is_tracked) assert_buffer_state(ref, TestBufferStats().used(2).hold(0).dead(2)); ref = add(spaces1000.c_str()); assert_buffer_state(ref, TestBufferStats().used(2).hold(0).dead(1).extra_used(1001)); - EntryRef ref2 = move(ref); + EntryRef ref2 = move_on_compact(ref); assert_get(ref2, spaces1000.c_str()); assert_buffer_state(ref, TestBufferStats().used(3).hold(0).dead(1).extra_used(2002)); remove(ref); @@ -159,7 +159,7 @@ TEST_F(StringTest, free_list_is_not_used_when_disabled) assert_buffer_state(ref2, TestBufferStats().used(3).hold(0).dead(2).extra_used(1001)); } -TEST_F(StringTest, free_list_is_never_used_for_move) +TEST_F(StringTest, free_list_is_never_used_for_move_on_compact) { // Free lists are default enabled for UniqueStoreStringAllocator EntryRef ref1 = add(small.c_str()); @@ -169,8 +169,8 @@ TEST_F(StringTest, free_list_is_never_used_for_move) remove(ref3); remove(ref4); trim_hold_lists(); - EntryRef ref5 = move(ref1); - EntryRef ref6 = move(ref2); + EntryRef ref5 = move_on_compact(ref1); + EntryRef ref6 = move_on_compact(ref2); EXPECT_NE(ref5, ref3); EXPECT_NE(ref6, ref4); assert_buffer_state(ref1, TestBufferStats().used(48).hold(0).dead(16)); |