aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/util/generationhandler/generationhandler_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vespalib/src/tests/util/generationhandler/generationhandler_test.cpp')
-rw-r--r--vespalib/src/tests/util/generationhandler/generationhandler_test.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/vespalib/src/tests/util/generationhandler/generationhandler_test.cpp b/vespalib/src/tests/util/generationhandler/generationhandler_test.cpp
index 00da752a749..0bc72f93a9d 100644
--- a/vespalib/src/tests/util/generationhandler/generationhandler_test.cpp
+++ b/vespalib/src/tests/util/generationhandler/generationhandler_test.cpp
@@ -26,10 +26,10 @@ GenerationHandlerTest::~GenerationHandlerTest() = default;
TEST_F(GenerationHandlerTest, require_that_generation_can_be_increased)
{
EXPECT_EQ(0u, gh.getCurrentGeneration());
- EXPECT_EQ(0u, gh.getFirstUsedGeneration());
+ EXPECT_EQ(0u, gh.get_oldest_used_generation());
gh.incGeneration();
EXPECT_EQ(1u, gh.getCurrentGeneration());
- EXPECT_EQ(1u, gh.getFirstUsedGeneration());
+ EXPECT_EQ(1u, gh.get_oldest_used_generation());
}
TEST_F(GenerationHandlerTest, require_that_readers_can_take_guards)
@@ -87,34 +87,34 @@ TEST_F(GenerationHandlerTest, require_that_guards_can_be_copied)
TEST_F(GenerationHandlerTest, require_that_the_first_used_generation_is_correct)
{
- EXPECT_EQ(0u, gh.getFirstUsedGeneration());
+ EXPECT_EQ(0u, gh.get_oldest_used_generation());
gh.incGeneration();
- EXPECT_EQ(1u, gh.getFirstUsedGeneration());
+ EXPECT_EQ(1u, gh.get_oldest_used_generation());
{
GenGuard g1 = gh.takeGuard();
gh.incGeneration();
EXPECT_EQ(1u, gh.getGenerationRefCount());
- EXPECT_EQ(1u, gh.getFirstUsedGeneration());
+ EXPECT_EQ(1u, gh.get_oldest_used_generation());
}
- EXPECT_EQ(1u, gh.getFirstUsedGeneration());
- gh.updateFirstUsedGeneration(); // Only writer should call this
+ EXPECT_EQ(1u, gh.get_oldest_used_generation());
+ gh.update_oldest_used_generation(); // Only writer should call this
EXPECT_EQ(0u, gh.getGenerationRefCount());
- EXPECT_EQ(2u, gh.getFirstUsedGeneration());
+ EXPECT_EQ(2u, gh.get_oldest_used_generation());
{
GenGuard g1 = gh.takeGuard();
gh.incGeneration();
gh.incGeneration();
EXPECT_EQ(1u, gh.getGenerationRefCount());
- EXPECT_EQ(2u, gh.getFirstUsedGeneration());
+ EXPECT_EQ(2u, gh.get_oldest_used_generation());
{
GenGuard g2 = gh.takeGuard();
- EXPECT_EQ(2u, gh.getFirstUsedGeneration());
+ EXPECT_EQ(2u, gh.get_oldest_used_generation());
}
}
- EXPECT_EQ(2u, gh.getFirstUsedGeneration());
- gh.updateFirstUsedGeneration(); // Only writer should call this
+ EXPECT_EQ(2u, gh.get_oldest_used_generation());
+ gh.update_oldest_used_generation(); // Only writer should call this
EXPECT_EQ(0u, gh.getGenerationRefCount());
- EXPECT_EQ(4u, gh.getFirstUsedGeneration());
+ EXPECT_EQ(4u, gh.get_oldest_used_generation());
}
TEST_F(GenerationHandlerTest, require_that_generation_can_grow_large)
@@ -124,7 +124,7 @@ TEST_F(GenerationHandlerTest, require_that_generation_can_grow_large)
EXPECT_EQ(i, gh.getCurrentGeneration());
guards.push_back(gh.takeGuard()); // take guard on current generation
if (i >= 128) {
- EXPECT_EQ(i - 128, gh.getFirstUsedGeneration());
+ EXPECT_EQ(i - 128, gh.get_oldest_used_generation());
guards.pop_front();
EXPECT_EQ(128u, gh.getGenerationRefCount());
}