Skip to content

Commit

Permalink
Auto merge of #9434 - ehuss:collision-doc-j1, r=Eh2406
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Apr 29, 2021
2 parents c564ae8 + 5003d53 commit 96be674
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testsuite/collisions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ fn collision_doc() {
.file("foo2/src/lib.rs", "")
.build();

p.cargo("doc")
p.cargo("doc -j=1")
.with_stderr_contains(
"\
[WARNING] output filename collision.
Expand Down Expand Up @@ -407,7 +407,7 @@ fn collision_doc_sources() {
.file("bar/src/lib.rs", "")
.build();

p.cargo("doc")
p.cargo("doc -j=1")
.with_stderr_unordered(
"\
[UPDATING] [..]
Expand Down Expand Up @@ -524,7 +524,7 @@ fn collision_with_root() {
.file("foo-macro/src/lib.rs", "")
.build();

p.cargo("doc")
p.cargo("doc -j=1")
.with_stderr_unordered("\
[UPDATING] [..]
[DOWNLOADING] crates ...
Expand Down

0 comments on commit 96be674

Please sign in to comment.