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 <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
Ian Cottrell 2019-04-01 11:28:21 -04:00
Родитель 5d16bdd7b5
Коммит e2f00d1e07
2 изменённых файлов: 1 добавлений и 7 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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)
}