提交 4afa24f8 编写于 作者: J Jay Zhuang 提交者: Facebook GitHub Bot

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
上级 6e63e77a
...@@ -1120,7 +1120,9 @@ TEST_F(CompactionJobTest, InputSerialization) { ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册