Increase the probability to generate keys after \xff\xff to test special key framework code

This commit is contained in:
Chaoguang Lin 2020-10-15 14:09:27 -07:00
parent c1b4e62bde
commit c145dd5824
1 changed files with 5 additions and 1 deletions

View File

@ -418,7 +418,11 @@ struct FuzzApiCorrectnessWorkload : TestWorkload {
for (size_t j = 0; j < key_size; ++j)
skey.append(1, (char) deterministicRandom()->randomInt(0, 256));
return Key(skey);
// 10% of the time generating keys after \xff\xff to test special keys code
if (deterministicRandom()->random01() < 0.1)
return Key(skey).withPrefix(specialKeys.begin);
else
return Key(skey);
}
static Value makeValue() {