skip direct I/O tests in rocksdb lite (#6867)
Summary: Fix a couple places where direct I/O was used even though it is unsupported in lite builds. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6867 Test Plan: `LITE=1 make check -j48` Reviewed By: pdillinger Differential Revision: D21689185 Pulled By: ajkr fbshipit-source-id: 3eaa3abf69cd7d0bcaabbcad3bb5a26fb8dd7301
This commit is contained in:
parent
38be686160
commit
292bcf6227
@ -74,6 +74,9 @@ class RandomAccessFileReaderTest : public testing::Test {
|
||||
}
|
||||
};
|
||||
|
||||
// Skip the following tests in lite mode since direct I/O is unsupported.
|
||||
#ifndef ROCKSDB_LITE
|
||||
|
||||
TEST_F(RandomAccessFileReaderTest, ReadDirectIO) {
|
||||
std::string fname = "read-direct-io";
|
||||
Random rand(0);
|
||||
@ -247,6 +250,8 @@ TEST_F(RandomAccessFileReaderTest, MultiReadDirectIO) {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // ROCKSDB_LITE
|
||||
|
||||
} // namespace ROCKSDB_NAMESPACE
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
@ -221,10 +221,18 @@ TEST_P(BlockBasedTableReaderTest, MultiGet) {
|
||||
|
||||
// Param 1: compression type
|
||||
// Param 2: whether to use direct reads
|
||||
#ifdef ROCKSDB_LITE
|
||||
// Skip direct I/O tests in lite mode since direct I/O is unsupported.
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
MultiGet, BlockBasedTableReaderTest,
|
||||
::testing::Combine(::testing::ValuesIn(GetSupportedCompressions()),
|
||||
::testing::Values(false)));
|
||||
#else // ROCKSDB_LITE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
MultiGet, BlockBasedTableReaderTest,
|
||||
::testing::Combine(::testing::ValuesIn(GetSupportedCompressions()),
|
||||
::testing::Bool()));
|
||||
#endif // ROCKSDB_LITE
|
||||
|
||||
} // namespace ROCKSDB_NAMESPACE
|
||||
|
||||
|
@ -339,6 +339,9 @@ class BlockFetcherTest : public testing::Test {
|
||||
}
|
||||
};
|
||||
|
||||
// Skip the following tests in lite mode since direct I/O is unsupported.
|
||||
#ifndef ROCKSDB_LITE
|
||||
|
||||
// Fetch index block under both direct IO and non-direct IO.
|
||||
// Expects:
|
||||
// the index block contents are the same for both read modes.
|
||||
@ -437,6 +440,8 @@ TEST_F(BlockFetcherTest, FetchAndUncompressCompressedDataBlock) {
|
||||
expected_non_direct_io_stats, expected_direct_io_stats);
|
||||
}
|
||||
|
||||
#endif // ROCKSDB_LITE
|
||||
|
||||
} // namespace
|
||||
} // namespace ROCKSDB_NAMESPACE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user