Skip to content

Commit 803ba93

Browse files
committed
Pass --network-concurrency 1 to yarn
We've been hitting issues in CI that look like yarnpkg/yarn#4563 and our hope is that this addresses the issue
1 parent e7b1fc1 commit 803ba93

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.yarnrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Integration tests run Yarn, and Yarn may fail if invoked concurrently.
22
# https://github.com/yarnpkg/yarn/issues/683
33
--mutex network
4-
4+
# We hit errors in Travis that look like what is outlined in
5+
# https://github.com/yarnpkg/yarn/issues/4563
6+
--network-concurrency 1

pkg/testing/integration/program.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,10 @@ func (pt *programTester) prepareProject(projectDir string) error {
764764
// Write a .yarnrc file to pass --mutex network to all yarn invocations, since tests
765765
// may run concurrently and yarn may fail if invoked concurrently
766766
// https://github.com/yarnpkg/yarn/issues/683
767-
yarnrcerr := ioutil.WriteFile(filepath.Join(projectDir, ".yarnrc"), []byte("--mutex network\n"), 0644)
767+
// Also add --network-concurrency 1 since we've been seeing
768+
// https://github.com/yarnpkg/yarn/issues/4563 as well
769+
yarnrcerr := ioutil.WriteFile(filepath.Join(projectDir, ".yarnrc"),
770+
[]byte("--mutex network\n--network-concurrency 1\n"), 0644)
768771
if yarnrcerr != nil {
769772
return yarnrcerr
770773
}

0 commit comments

Comments
 (0)