aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-03-10 13:13:51 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-03-10 13:27:00 +0000
commitcc04abc57ff890ee0e2f1956433520b72c9d6b14 (patch)
treec5dff4a4aff8ec3d5f081f7f1af8909256176296 /vespalib/src/tests/datastore/unique_store_string_allocator/unique_store_string_allocator_test.cpp
parent4fc5346dcb568d2bd4e284d0ddfd1228cd904d53 (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.cpp6
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());