Skip to content

Commit

Permalink
Omes empty payload (#79)
Browse files Browse the repository at this point in the history
* Use a "binary/null" message for an empty payload

* Support generator config in fuzzer options
  • Loading branch information
Quinn-With-Two-Ns authored Feb 26, 2024
1 parent 5f4065a commit 3f0fa02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions loadgen/kitchen-sink-gen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -810,9 +810,9 @@ fn empty_payload() -> Payload {
Payload {
metadata: {
let mut m = HashMap::new();
m.insert("encoding".to_string(), "json/plain".into());
m.insert("encoding".to_string(), "binary/null".into());
m
},
data: serde_json::to_vec("").expect("serializes"),
data: vec![], // Empty
}
}
5 changes: 5 additions & 0 deletions scenarios/fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package scenarios

import (
"context"

"github.com/temporalio/omes/loadgen"
)

Expand All @@ -16,6 +17,10 @@ func init() {
if ok && seed != "" {
args = append(args, "--explicit-seed", seed)
}
config, ok := info.ScenarioOptions["config"]
if ok && config != "" {
args = append(args, "--generator-config-override", config)
}
return loadgen.FileOrArgs{
Args: args,
}
Expand Down

0 comments on commit 3f0fa02

Please sign in to comment.