Skip to content

Commit

Permalink
reduce iteration counts for Miri
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jun 26, 2022
1 parent c1a3827 commit b7839ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/it.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ mod sync {
#[test]
fn get_or_init_stress() {
use std::sync::Barrier;
let n_threads = 1_000;
let n_cells = 1_000;
let n_threads = if cfg!(miri) { 30 } else { 1_000 };
let n_cells = if cfg!(miri) { 30 } else { 1_000 };
let cells: Vec<_> = std::iter::repeat_with(|| (Barrier::new(n_threads), OnceCell::new()))
.take(n_cells)
.collect();
Expand Down Expand Up @@ -577,7 +577,7 @@ mod sync {

#[test]
fn once_cell_does_not_leak_partially_constructed_boxes() {
let n_tries = 100;
let n_tries = if cfg!(miri) { 10 } else { 100 };
let n_readers = 10;
let n_writers = 3;
const MSG: &str = "Hello, World";
Expand Down

0 comments on commit b7839ed

Please sign in to comment.