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
This commit is contained in:
parent
e7b1fc1aac
commit
803ba93bf5
4
.yarnrc
4
.yarnrc
|
@ -1,4 +1,6 @@
|
||||||
# Integration tests run Yarn, and Yarn may fail if invoked concurrently.
|
# Integration tests run Yarn, and Yarn may fail if invoked concurrently.
|
||||||
# https://github.com/yarnpkg/yarn/issues/683
|
# https://github.com/yarnpkg/yarn/issues/683
|
||||||
--mutex network
|
--mutex network
|
||||||
|
# We hit errors in Travis that look like what is outlined in
|
||||||
|
# https://github.com/yarnpkg/yarn/issues/4563
|
||||||
|
--network-concurrency 1
|
||||||
|
|
|
@ -764,7 +764,10 @@ func (pt *programTester) prepareProject(projectDir string) error {
|
||||||
// Write a .yarnrc file to pass --mutex network to all yarn invocations, since tests
|
// Write a .yarnrc file to pass --mutex network to all yarn invocations, since tests
|
||||||
// may run concurrently and yarn may fail if invoked concurrently
|
// may run concurrently and yarn may fail if invoked concurrently
|
||||||
// https://github.com/yarnpkg/yarn/issues/683
|
// https://github.com/yarnpkg/yarn/issues/683
|
||||||
yarnrcerr := ioutil.WriteFile(filepath.Join(projectDir, ".yarnrc"), []byte("--mutex network\n"), 0644)
|
// Also add --network-concurrency 1 since we've been seeing
|
||||||
|
// https://github.com/yarnpkg/yarn/issues/4563 as well
|
||||||
|
yarnrcerr := ioutil.WriteFile(filepath.Join(projectDir, ".yarnrc"),
|
||||||
|
[]byte("--mutex network\n--network-concurrency 1\n"), 0644)
|
||||||
if yarnrcerr != nil {
|
if yarnrcerr != nil {
|
||||||
return yarnrcerr
|
return yarnrcerr
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue