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:
Matt Ellis 2018-01-29 09:29:02 -08:00
parent e7b1fc1aac
commit 803ba93bf5
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,6 @@
# Integration tests run Yarn, and Yarn may fail if invoked concurrently.
# https://github.com/yarnpkg/yarn/issues/683
--mutex network
# We hit errors in Travis that look like what is outlined in
# https://github.com/yarnpkg/yarn/issues/4563
--network-concurrency 1

View File

@ -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
// may run concurrently and yarn may fail if invoked concurrently
// 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 {
return yarnrcerr
}