From e2f00d1e077caed96bb6eb4ce03a6bc8464e6c59 Mon Sep 17 00:00:00 2001 From: Ian Cottrell Date: Mon, 1 Apr 2019 11:28:21 -0400 Subject: [PATCH] internal/lsp: make pipe mode the default for command line tests now there are no more race conditions in the jsonrpc or server code make connected pipe (rather than direct API) the default in the tests to make sure we stay clean. Change-Id: Id1ffede795a660dbf7b265b9e0419c60cf83c6e8 Reviewed-on: https://go-review.googlesource.com/c/tools/+/170181 Run-TryBot: Ian Cottrell TryBot-Result: Gobot Gobot Reviewed-by: Rebecca Stambler --- internal/lsp/cmd/check_test.go | 5 +---- internal/lsp/cmd/cmd_test.go | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/internal/lsp/cmd/check_test.go b/internal/lsp/cmd/check_test.go index 9f77e820..0665b4b7 100644 --- a/internal/lsp/cmd/check_test.go +++ b/internal/lsp/cmd/check_test.go @@ -40,10 +40,7 @@ func (l diagnostics) test(t *testing.T, e *packagestest.Exported) { if len(want) == 1 && want[0].Message == "" { continue } - args := []string{} - if *internalPipe { - args = append(args, "-remote=internal") - } + args := []string{"-remote=internal"} args = append(args, "check", fname) app := &cmd.Application{} app.Config = *e.Config diff --git a/internal/lsp/cmd/cmd_test.go b/internal/lsp/cmd/cmd_test.go index b67866ea..8a565871 100644 --- a/internal/lsp/cmd/cmd_test.go +++ b/internal/lsp/cmd/cmd_test.go @@ -5,7 +5,6 @@ package cmd_test import ( - "flag" "io/ioutil" "os" "strings" @@ -24,8 +23,6 @@ const ( expectedFormatCount = 4 ) -var internalPipe = flag.Bool("pipe", false, "connect the command line client to a server through a pipe") - func TestCommandLine(t *testing.T) { packagestest.TestAll(t, testCommandLine) }