summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/docstore
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahoo-inc.com>2017-05-11 09:11:35 +0000
committerGeir Storli <geirst@yahoo-inc.com>2017-05-12 14:01:24 +0000
commit931693eb3db9bf0b061b74bc4eb328f43b39dd62 (patch)
tree9d8420d8becc907a7f3ca14271fbda0823b6f8c3 /searchlib/src/tests/docstore
parent6d253c5644128fa500dfb27ceb48a79a58522db8 (diff)
Fix such that getLid() is protected by docIdLimit.
Diffstat (limited to 'searchlib/src/tests/docstore')
-rw-r--r--searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
index f2a41e10819..54218d5c73f 100644
--- a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
+++ b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
@@ -898,6 +898,14 @@ TEST("require that lid space can be compacted and entries from old files skipped
}
}
+TEST_F("require that getLid() is protected by docIdLimit", Fixture("tmp"))
+{
+ f.write(1);
+ vespalib::GenerationHandler::Guard guard = f.store.getLidReadGuard();
+ EXPECT_TRUE(f.store.getLid(guard, 1).valid());
+ EXPECT_FALSE(f.store.getLid(guard, 2).valid());
+}
+
TEST_MAIN() {
DummyFileHeaderContext::setCreator("logdatastore_test");
TEST_RUN_ALL();