From bf90fac03a4d1a07f50701547d56fabfdb0c32ec Mon Sep 17 00:00:00 2001 From: Keegan Carruthers-Smith Date: Tue, 7 Aug 2018 16:40:45 +0200 Subject: [PATCH] Prevent deadlock in reading notifications for integration test (#303) --- .travis.yml | 2 +- langserver/integration_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 00e389cb..ae19babd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ install: script: - cd $TRAVIS_BUILD_DIR - - go test -race -v ./... + - go test -timeout 5m -race -v ./... diff --git a/langserver/integration_test.go b/langserver/integration_test.go index 0a62e666..0413e6ed 100644 --- a/langserver/integration_test.go +++ b/langserver/integration_test.go @@ -355,7 +355,7 @@ func integrationTest( addr, done := startServer(t, h) defer done() - notifies := make(chan *jsonrpc2.Request) + notifies := make(chan *jsonrpc2.Request, 10) conn := dialServer(t, addr, jsonrpc2.HandlerWithError(func(_ context.Context, _ *jsonrpc2.Conn, req *jsonrpc2.Request) (interface{}, error) { notifies <- req return nil, nil