Skip to content

Commit 6afa0f2

Browse files
authored
Unrolled build for rust-lang#131085
Rollup merge of rust-lang#131085 - RalfJung:miri-slow-test, r=tgross35 make test_lots_of_insertions test take less long in Miri This is by far the slowest `std` test in Miri, taking >2min in https://github.com/rust-lang/miri-test-libstd CI. So let's make this `count` smaller. The runtime should be quadratic in `count` so reducing it to around 2/3 of it's previous value should cut the total time down to less than half -- making it still the slowest test, but by less of a margin. (And this way we still insert >64 elements into the HashMap, in case that power of 2 matters.)
2 parents 8dd5cd0 + 4529b86 commit 6afa0f2

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/collections/hash/map

1 file changed

+1
-1
lines changed

library/std/src/collections/hash/map/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ fn test_lots_of_insertions() {
274274
for _ in 0..loops {
275275
assert!(m.is_empty());
276276

277-
let count = if cfg!(miri) { 101 } else { 1001 };
277+
let count = if cfg!(miri) { 66 } else { 1001 };
278278

279279
for i in 1..count {
280280
assert!(m.insert(i, i).is_none());

0 commit comments

Comments
 (0)