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()
|
.iter()
|
||||||
.map(|idx| match all_options[*idx] {
|
.map(|idx| match all_options[*idx] {
|
||||||
AlterTableOption::Ttl(_) => {
|
AlterTableOption::Ttl(_) => {
|
||||||
let ttl_type = rng.random_range(0..3);
|
// The database purges expired files in background so it's hard to check
|
||||||
match ttl_type {
|
// non-forever TTL.
|
||||||
0 => {
|
AlterTableOption::Ttl(Ttl::Forever)
|
||||||
let duration: u32 = rng.random();
|
|
||||||
AlterTableOption::Ttl(Ttl::Duration((duration as i64).into()))
|
|
||||||
}
|
|
||||||
1 => AlterTableOption::Ttl(Ttl::Instant),
|
|
||||||
2 => AlterTableOption::Ttl(Ttl::Forever),
|
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
AlterTableOption::TwcsTimeWindow(_) => {
|
AlterTableOption::TwcsTimeWindow(_) => {
|
||||||
let time_window: u32 = rng.random();
|
let time_window: u32 = rng.random();
|
||||||
|
|||||||
Reference in New Issue
Block a user