summaryrefslogtreecommitdiff
path: root/pool
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-11-25 15:31:24 +0300
committerValery Piashchynski <[email protected]>2021-11-25 15:31:24 +0300
commit6123a45bd77f50b137d46577089b7b43c692b2d1 (patch)
treefb688befd82ada5ee8fa466f3393b9db37b09538 /pool
parent6c5e3ab6c01d31caa2d14930c188bae697c5cd48 (diff)
update goridge
print bad header in the error message Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pool')
-rwxr-xr-xpool/static_pool_test.go17
1 files changed, 15 insertions, 2 deletions
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