Deflake test `CompactionJobTest.InputSerialization` (#8712)

Summary:
It's invalid to have an empty file name.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8712

Test Plan:
```
$ gtest-parallel ./compaction_job_test --gtest_filter=CompactionJobTest.InputSerialization -r 10000
```

Reviewed By: pdillinger

Differential Revision: D30566739

Pulled By: jay-zhuang

fbshipit-source-id: 41e73175e3c95c4b73b4fdcd33470788d4e29d37
main
Jay Zhuang 3 years ago committed by Facebook GitHub Bot
parent 6e63e77af1
commit 4afa24f8ae
  1. 4
      db/compaction/compaction_job_test.cc

@ -1120,7 +1120,9 @@ TEST_F(CompactionJobTest, InputSerialization) {
input.snapshots.emplace_back(rnd64.Uniform(UINT64_MAX)); input.snapshots.emplace_back(rnd64.Uniform(UINT64_MAX));
} }
while (!rnd.OneIn(10)) { while (!rnd.OneIn(10)) {
input.input_files.emplace_back(rnd.RandomString(rnd.Uniform(kStrMaxLen))); input.input_files.emplace_back(rnd.RandomString(
rnd.Uniform(kStrMaxLen - 1) +
1)); // input file name should have at least one character
} }
input.output_level = 4; input.output_level = 4;
input.has_begin = rnd.OneIn(2); input.has_begin = rnd.OneIn(2);

Loading…
Cancel
Save