Skip to content

Commit

Permalink
chore: use Alphanumeric.sample_string to generate random data
Browse files Browse the repository at this point in the history
getting u\0000 codepoints in the data, that crashes the postgres indexer because it's not allowed in jsonb data
  • Loading branch information
dav1do committed May 3, 2024
1 parent 71f1413 commit ec0b34d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runner/src/scenario/ceramic/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ impl LargeModel {
impl RandomModelInstance for LargeModel {
fn random() -> Self {
let mut rng = thread_rng();
let name: String = (1..100).map(|_| rng.gen::<char>()).collect();
let name = Alphanumeric.sample_string(&mut rand::thread_rng(), 100);
Self {
creator: "keramik".to_string(),
name: format!("keramik-large-model-{}", name),
description: (1..1_000).map(|_| rng.gen::<char>()).collect(),
description: Alphanumeric.sample_string(&mut rand::thread_rng(), 1000),
tpe: rng.gen_range(0..100),
}
}
Expand Down

0 comments on commit ec0b34d

Please sign in to comment.