Add LZ4 compression to sanity test

Summary: This will be used to test format changes in https://reviews.facebook.net/D31461

Test Plan: run it

Reviewers: MarkCallaghan, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D31515
main
Igor Canadi 10 years ago
parent 2ccc54301d
commit 516a04267e
  1. 28
      tools/db_sanity_test.cc

@ -133,6 +133,32 @@ class SanityTestZlibCompression : public SanityTest {
Options options_; Options options_;
}; };
class SanityTestLZ4Compression : public SanityTest {
public:
explicit SanityTestLZ4Compression(const std::string& path)
: SanityTest(path) {
options_.compression = kLZ4Compression;
}
virtual Options GetOptions() const { return options_; }
virtual std::string Name() const { return "LZ4Compression"; }
private:
Options options_;
};
class SanityTestLZ4HCCompression : public SanityTest {
public:
explicit SanityTestLZ4HCCompression(const std::string& path)
: SanityTest(path) {
options_.compression = kLZ4HCCompression;
}
virtual Options GetOptions() const { return options_; }
virtual std::string Name() const { return "LZ4HCCompression"; }
private:
Options options_;
};
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
class SanityTestPlainTableFactory : public SanityTest { class SanityTestPlainTableFactory : public SanityTest {
public: public:
@ -171,6 +197,8 @@ bool RunSanityTests(const std::string& command, const std::string& path) {
std::vector<SanityTest*> sanity_tests = { std::vector<SanityTest*> sanity_tests = {
new SanityTestBasic(path), new SanityTestSpecialComparator(path), new SanityTestBasic(path), new SanityTestSpecialComparator(path),
new SanityTestZlibCompression(path), new SanityTestZlibCompression(path),
new SanityTestLZ4Compression(path),
new SanityTestLZ4HCCompression(path),
#ifndef ROCKSDB_LITE #ifndef ROCKSDB_LITE
new SanityTestPlainTableFactory(path), new SanityTestPlainTableFactory(path),
#endif // ROCKSDB_LITE #endif // ROCKSDB_LITE

Loading…
Cancel
Save