Skip to content

Commit

Permalink
chore: after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
discord9 committed Dec 26, 2024
1 parent 833eb43 commit 463e820
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions tests-fuzz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ Set the GreptimeDB MySQL address.
```
GT_MYSQL_ADDR = localhost:4002
```
and http address:
```
GT_HTTP_ADDR=localhost:4000
```
and fuzz build path when compiling the fuzzer using `cargo fuzz`(if you want to keep the build dir clean):
```
CARGO_TARGET_DIR="fuzz_build"
```

### For unstable fuzz tests
Set the binary path of the GreptimeDB:
Expand Down
2 changes: 1 addition & 1 deletion tests-fuzz/src/ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use std::time::Duration;

pub use alter_expr::{AlterTableExpr, AlterTableOption, AlterTableOperation};
pub use alter_expr::{AlterTableExpr, AlterTableOperation, AlterTableOption};
use common_time::timestamp::TimeUnit;
use common_time::{Date, DateTime, Timestamp};
pub use create_expr::{CreateDatabaseExpr, CreateTableExpr};
Expand Down
4 changes: 2 additions & 2 deletions tests-fuzz/targets/fuzz_concurr_alter_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async fn unstable_execute_parallel_alter_table(ctx: FuzzContext, input: FuzzInpu
let mut action = 0;
while action < input.actions {
let expr = generate_alter_table_add_column_expr(table_ctx.clone(), &mut rng).unwrap();
if let AlterTableOperation::AddColumn { column, .. } = &expr.alter_options {
if let AlterTableOperation::AddColumn { column, .. } = &expr.alter_kinds {
if used_column_names.contains(&column.name) {
info!("Column name already used: {}, retrying", column.name.value);
continue;
Expand All @@ -149,7 +149,7 @@ async fn unstable_execute_parallel_alter_table(ctx: FuzzContext, input: FuzzInpu
}
let translator = AlterTableExprTranslator;
let sql = translator.translate(&expr)?;
if let AlterTableOperation::AddColumn { .. } = expr.alter_options {
if let AlterTableOperation::AddColumn { .. } = expr.alter_kinds {
// Applies changes
after_all_alter_table_ctx = Arc::new(
Arc::unwrap_or_clone(after_all_alter_table_ctx)
Expand Down

0 comments on commit 463e820

Please sign in to comment.