aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/db/db_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/leveldb/db/db_test.cc')
-rw-r--r--src/leveldb/db/db_test.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/leveldb/db/db_test.cc b/src/leveldb/db/db_test.cc
index 3744d0e117..74abd13e5c 100644
--- a/src/leveldb/db/db_test.cc
+++ b/src/leveldb/db/db_test.cc
@@ -1442,6 +1442,12 @@ TEST(DBTest, DBOpen_Options) {
db = NULL;
}
+TEST(DBTest, Locking) {
+ DB* db2 = NULL;
+ Status s = DB::Open(CurrentOptions(), dbname_, &db2);
+ ASSERT_TRUE(!s.ok()) << "Locking did not prevent re-opening db";
+}
+
// Check that number of files does not grow when we are out of space
TEST(DBTest, NoSpace) {
Options options = CurrentOptions();