From 0702b909c0e48c5721076a5a87ba71d539c64d36 Mon Sep 17 00:00:00 2001 From: Cody Tatman Date: Thu, 6 Aug 2020 18:11:26 -0700 Subject: [PATCH] fix: increase max size of pact output buffer --- dsl/client.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dsl/client.go b/dsl/client.go index 1fb8d9b3c..fb176ddba 100644 --- a/dsl/client.go +++ b/dsl/client.go @@ -193,22 +193,25 @@ func (p *PactClient) VerifyProvider(request types.VerifyRequest) ([]types.Provid stdOutScanner := bufio.NewScanner(stdOutPipe) go func() { wg.Add(1) + defer wg.Done() + stdOutBuf := make([]byte, bufio.MaxScanTokenSize) + stdOutScanner.Buffer(stdOutBuf, 64*1024*1024) + for stdOutScanner.Scan() { verifications = append(verifications, stdOutScanner.Text()) } - wg.Done() }() // Scrape errors stdErrScanner := bufio.NewScanner(stdErrPipe) go func() { wg.Add(1) + defer wg.Done() for stdErrScanner.Scan() { stdErr.WriteString(fmt.Sprintf("%s\n", stdErrScanner.Text())) } - wg.Done() }() err = cmd.Start()