Update to LevelDB 1.20
[bitcoinplatinum.git] / src / leveldb / util / env_posix_test_helper.h
blob038696059826042f57808b58505c7f4339c54337
1 // Copyright 2017 The LevelDB Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. See the AUTHORS file for names of contributors.
5 #ifndef STORAGE_LEVELDB_UTIL_ENV_POSIX_TEST_HELPER_H_
6 #define STORAGE_LEVELDB_UTIL_ENV_POSIX_TEST_HELPER_H_
8 namespace leveldb {
10 class EnvPosixTest;
12 // A helper for the POSIX Env to facilitate testing.
13 class EnvPosixTestHelper {
14 private:
15 friend class EnvPosixTest;
17 // Set the maximum number of read-only files that will be opened.
18 // Must be called before creating an Env.
19 static void SetReadOnlyFDLimit(int limit);
21 // Set the maximum number of read-only files that will be mapped via mmap.
22 // Must be called before creating an Env.
23 static void SetReadOnlyMMapLimit(int limit);
26 } // namespace leveldb
28 #endif // STORAGE_LEVELDB_UTIL_ENV_POSIX_TEST_HELPER_H_