split RandomizedHarnessTest more ways

Summary:
RandomizedHarnessTest enumerates different combinations of test type, compression type, restart interval, etc. For some combinations it takes very long to finish, causing the test to time out in test infrastructure.
This PR split the test input into smaller trunks in the hope that they will fit in the timeout window. Another possibility is to reduce `num_entries` of course
Closes https://github.com/facebook/rocksdb/pull/3467

Differential Revision: D6910235

Pulled By: miasantreble

fbshipit-source-id: 717246ee5d21a8a48ad82d4d9c04f9051a66f07f
This commit is contained in:
Zhongyi Xie 2018-02-06 13:54:53 -08:00 committed by Facebook Github Bot
parent 88d8b2a2f5
commit 2f29991701

View File

@ -2603,17 +2603,49 @@ TEST_F(GeneralTableTest, ApproximateOffsetOfCompressed) {
}
}
TEST_F(HarnessTest, Randomized0) {
// part 1 out of 2
// RandomizedHarnessTest is very slow for certain combination of arguments
// Split into 8 pieces to reduce the time individual tests take.
TEST_F(HarnessTest, Randomized1n2) {
// part 1,2 out of 8
const size_t part = 1;
const size_t total = 2;
const size_t total = 8;
RandomizedHarnessTest(part, total);
RandomizedHarnessTest(part+1, total);
}
TEST_F(HarnessTest, Randomized3n4) {
// part 3,4 out of 8
const size_t part = 3;
const size_t total = 8;
RandomizedHarnessTest(part, total);
RandomizedHarnessTest(part+1, total);
}
TEST_F(HarnessTest, Randomized5) {
// part 5 out of 8
const size_t part = 5;
const size_t total = 8;
RandomizedHarnessTest(part, total);
}
TEST_F(HarnessTest, Randomized1) {
// part 2 out of 2
const size_t part = 2;
const size_t total = 2;
TEST_F(HarnessTest, Randomized6) {
// part 6 out of 8
const size_t part = 6;
const size_t total = 8;
RandomizedHarnessTest(part, total);
}
TEST_F(HarnessTest, Randomized7) {
// part 7 out of 8
const size_t part = 7;
const size_t total = 8;
RandomizedHarnessTest(part, total);
}
TEST_F(HarnessTest, Randomized8) {
// part 8 out of 8
const size_t part = 8;
const size_t total = 8;
RandomizedHarnessTest(part, total);
}