From 803ba93bf593434c2cfca88b6847728bb2760c34 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Mon, 29 Jan 2018 09:29:02 -0800 Subject: [PATCH] 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 --- .yarnrc | 4 +++- pkg/testing/integration/program.go | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.yarnrc b/.yarnrc index b2f937033..d6db20752 100644 --- a/.yarnrc +++ b/.yarnrc @@ -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 diff --git a/pkg/testing/integration/program.go b/pkg/testing/integration/program.go index 456a1c4ba..915b575d7 100644 --- a/pkg/testing/integration/program.go +++ b/pkg/testing/integration/program.go @@ -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 }