summaryrefslogtreecommitdiff
path: root/pool/static_pool_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pool/static_pool_test.go')
-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