mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-22 22:20:02 +00:00
test: only set ttl to forever in fuzz alter test (#7202)
Signed-off-by: evenyag <realevenyag@gmail.com>
This commit is contained in:
@@ -219,16 +219,9 @@ impl<R: Rng> Generator<AlterTableExpr, R> for AlterExprSetTableOptionsGenerator<
|
||||
.iter()
|
||||
.map(|idx| match all_options[*idx] {
|
||||
AlterTableOption::Ttl(_) => {
|
||||
let ttl_type = rng.random_range(0..3);
|
||||
match ttl_type {
|
||||
0 => {
|
||||
let duration: u32 = rng.random();
|
||||
AlterTableOption::Ttl(Ttl::Duration((duration as i64).into()))
|
||||
}
|
||||
1 => AlterTableOption::Ttl(Ttl::Instant),
|
||||
2 => AlterTableOption::Ttl(Ttl::Forever),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
// The database purges expired files in background so it's hard to check
|
||||
// non-forever TTL.
|
||||
AlterTableOption::Ttl(Ttl::Forever)
|
||||
}
|
||||
AlterTableOption::TwcsTimeWindow(_) => {
|
||||
let time_window: u32 = rng.random();
|
||||
|
||||
Reference in New Issue
Block a user