diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-03-10 13:13:51 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-03-10 13:27:00 +0000 |
commit | cc04abc57ff890ee0e2f1956433520b72c9d6b14 (patch) | |
tree | c5dff4a4aff8ec3d5f081f7f1af8909256176296 /vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp | |
parent | 4fc5346dcb568d2bd4e284d0ddfd1228cd904d53 (diff) |
Use a non const Store when you are in write thread, and a const when not.
Diffstat (limited to 'vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp')
-rw-r--r-- | vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 64e0c1599bd..7d4451556c8 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 @@ -56,11 +56,11 @@ struct TestBase : public ::testing::Test { uint32_t get_buffer_id(EntryRef ref) const { return EntryRefType(ref).bufferId(); } - const BufferState &buffer_state(EntryRef ref) const { + BufferState &buffer_state(EntryRef ref) { return allocator.get_data_store().getBufferState(get_buffer_id(ref)); } - void assert_buffer_state(EntryRef ref, const TestBufferStats expStats) const { - const auto & stats = buffer_state(ref).stats(); + void assert_buffer_state(EntryRef ref, const TestBufferStats expStats) { + auto & stats = buffer_state(ref).stats(); EXPECT_EQ(expStats._used, buffer_state(ref).size()); EXPECT_EQ(expStats._hold, stats.hold_elems()); EXPECT_EQ(expStats._dead, stats.dead_elems()); |