Skip to content

Commit

Permalink
editoast: test persist_batch on big chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
Khoyo authored and flomonster committed Nov 23, 2022
1 parent 537f127 commit ede0ae3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions editoast/src/schema/buffer_stop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,15 @@ mod test {
assert!(BufferStop::persist_batch(&data, infra.id, conn).is_ok());
});
}

#[test]
fn test_persist_large() {
test_infra_transaction(|conn, infra| {
let data = (0..(2_usize.pow(16) * 2))
.map(|_| BufferStop::default())
.collect::<Vec<BufferStop>>();

assert!(BufferStop::persist_batch(&data, infra.id, conn).is_ok());
});
}
}

0 comments on commit ede0ae3

Please sign in to comment.