From 6123a45bd77f50b137d46577089b7b43c692b2d1 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 25 Nov 2021 15:31:24 +0300 Subject: update goridge print bad header in the error message Signed-off-by: Valery Piashchynski --- pool/static_pool_test.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'pool') diff --git a/pool/static_pool_test.go b/pool/static_pool_test.go index 717d301e..8e2667ac 100755 --- a/pool/static_pool_test.go +++ b/pool/static_pool_test.go @@ -23,8 +23,8 @@ import ( var cfg = &Config{ NumWorkers: uint64(runtime.NumCPU()), - AllocateTimeout: time.Second * 5, - DestroyTimeout: time.Second * 5, + AllocateTimeout: time.Second * 500, + DestroyTimeout: time.Second * 500, } func Test_NewPool(t *testing.T) { @@ -560,6 +560,19 @@ func Test_Static_Pool_WrongCommand2(t *testing.T) { assert.Nil(t, p) } +func Test_CRC_WithPayload(t *testing.T) { + ctx := context.Background() + _, err := Initialize( + ctx, + func() *exec.Cmd { return exec.Command("php", "../tests/crc_error.php") }, + pipe.NewPipeFactory(), + cfg, + ) + assert.Error(t, err) + data := err.Error() + assert.Contains(t, data, "warning: some weird php erro") +} + /* PTR: Benchmark_Pool_Echo-32 49076 29926 ns/op 8016 B/op 20 allocs/op Benchmark_Pool_Echo-32 47257 30779 ns/op 8047 B/op 20 allocs/op -- cgit v1.2.3