Skip to content

Commit 96be674

Browse files
committed
Auto merge of #9434 - ehuss:collision-doc-j1, r=Eh2406
Fix collision doc tests randomly failing. This fixes some tests that were randomly failing on CI. The cause is that #9419 added a remove_dir_all on the `doc` directory. However, if two jobs are trying to write to that directory at the same time, this can cause errors. The failure rate is low (a little over 1%), and I was unable to reproduce locally (only on GitHub's CI and only on the Windows job). The solution is to run the jobs with -j1 so they run serially. I only saw errors for `collision_doc_sources`, but to be on the safe side I added j1 to similar tests.
2 parents c564ae8 + 5003d53 commit 96be674

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/testsuite/collisions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ fn collision_doc() {
146146
.file("foo2/src/lib.rs", "")
147147
.build();
148148

149-
p.cargo("doc")
149+
p.cargo("doc -j=1")
150150
.with_stderr_contains(
151151
"\
152152
[WARNING] output filename collision.
@@ -407,7 +407,7 @@ fn collision_doc_sources() {
407407
.file("bar/src/lib.rs", "")
408408
.build();
409409

410-
p.cargo("doc")
410+
p.cargo("doc -j=1")
411411
.with_stderr_unordered(
412412
"\
413413
[UPDATING] [..]
@@ -524,7 +524,7 @@ fn collision_with_root() {
524524
.file("foo-macro/src/lib.rs", "")
525525
.build();
526526

527-
p.cargo("doc")
527+
p.cargo("doc -j=1")
528528
.with_stderr_unordered("\
529529
[UPDATING] [..]
530530
[DOWNLOADING] crates ...

0 commit comments

Comments
 (0)