diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-10-01 17:32:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-01 17:32:09 +0200 |
| commit | b9263c6b9fc1e9a9bd893c8a622f8bdb1e0e4836 (patch) | |
| tree | 4b08bcd0180297d5cb58f88512528bfd5daa2d59 | |
| parent | d007008242b9db843254b7811e85c99a243773a5 (diff) | |
| parent | 4529b86196836ef1efe5c710a8874877d17b9ef8 (diff) | |
| download | rust-b9263c6b9fc1e9a9bd893c8a622f8bdb1e0e4836.tar.gz rust-b9263c6b9fc1e9a9bd893c8a622f8bdb1e0e4836.zip | |
Rollup merge of #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.)
| -rw-r--r-- | library/std/src/collections/hash/map/tests.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/collections/hash/map/tests.rs b/library/std/src/collections/hash/map/tests.rs index 2599060ef62..fa8ea95b891 100644 --- a/library/std/src/collections/hash/map/tests.rs +++ b/library/std/src/collections/hash/map/tests.rs @@ -274,7 +274,7 @@ fn test_lots_of_insertions() { for _ in 0..loops { assert!(m.is_empty()); - let count = if cfg!(miri) { 101 } else { 1001 }; + let count = if cfg!(miri) { 66 } else { 1001 }; for i in 1..count { assert!(m.insert(i, i).is_none()); |
