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.go44
1 files changed, 22 insertions, 22 deletions
diff --git a/pool/static_pool_test.go b/pool/static_pool_test.go
index 29b0fc56..9861f0d8 100755
--- a/pool/static_pool_test.go
+++ b/pool/static_pool_test.go
@@ -30,7 +30,7 @@ func Test_NewPool(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "echo", "pipes") },
pipe.NewPipeFactory(),
cfg,
)
@@ -44,7 +44,7 @@ func Test_NewPool(t *testing.T) {
func Test_StaticPool_Invalid(t *testing.T) {
p, err := Initialize(
context.Background(),
- func() *exec.Cmd { return exec.Command("php", "../../tests/invalid.php") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/invalid.php") },
pipe.NewPipeFactory(),
cfg,
)
@@ -56,7 +56,7 @@ func Test_StaticPool_Invalid(t *testing.T) {
func Test_ConfigNoErrorInitDefaults(t *testing.T) {
p, err := Initialize(
context.Background(),
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "echo", "pipes") },
pipe.NewPipeFactory(),
&Config{
AllocateTimeout: time.Second,
@@ -72,7 +72,7 @@ func Test_StaticPool_Echo(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "echo", "pipes") },
pipe.NewPipeFactory(),
cfg,
)
@@ -96,7 +96,7 @@ func Test_StaticPool_Echo_NilContext(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "echo", "pipes") },
pipe.NewPipeFactory(),
cfg,
)
@@ -120,7 +120,7 @@ func Test_StaticPool_Echo_Context(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "head", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "head", "pipes") },
pipe.NewPipeFactory(),
cfg,
)
@@ -144,7 +144,7 @@ func Test_StaticPool_JobError(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "error", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "error", "pipes") },
pipe.NewPipeFactory(),
cfg,
)
@@ -183,7 +183,7 @@ func Test_StaticPool_Broken_Replace(t *testing.T) {
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "broken", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "broken", "pipes") },
pipe.NewPipeFactory(),
cfg,
AddListeners(listener),
@@ -221,7 +221,7 @@ func Test_StaticPool_Broken_FromOutside(t *testing.T) {
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "echo", "pipes") },
pipe.NewPipeFactory(),
cfg2,
AddListeners(listener),
@@ -261,7 +261,7 @@ func Test_StaticPool_Broken_FromOutside(t *testing.T) {
func Test_StaticPool_AllocateTimeout(t *testing.T) {
p, err := Initialize(
context.Background(),
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "delay", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "delay", "pipes") },
pipe.NewPipeFactory(),
&Config{
NumWorkers: 1,
@@ -280,7 +280,7 @@ func Test_StaticPool_Replace_Worker(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "pid", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "pid", "pipes") },
pipe.NewPipeFactory(),
&Config{
NumWorkers: 1,
@@ -319,7 +319,7 @@ func Test_StaticPool_Debug_Worker(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "pid", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "pid", "pipes") },
pipe.NewPipeFactory(),
&Config{
Debug: true,
@@ -361,7 +361,7 @@ func Test_StaticPool_Stop_Worker(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "stop", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "stop", "pipes") },
pipe.NewPipeFactory(),
&Config{
NumWorkers: 1,
@@ -402,7 +402,7 @@ func Test_Static_Pool_Destroy_And_Close(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "delay", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "delay", "pipes") },
pipe.NewPipeFactory(),
&Config{
NumWorkers: 1,
@@ -424,7 +424,7 @@ func Test_Static_Pool_Destroy_And_Close_While_Wait(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "delay", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "delay", "pipes") },
pipe.NewPipeFactory(),
&Config{
NumWorkers: 1,
@@ -454,7 +454,7 @@ func Test_Static_Pool_Handle_Dead(t *testing.T) {
ctx := context.Background()
p, err := Initialize(
context.Background(),
- func() *exec.Cmd { return exec.Command("php", "../../tests/slow-destroy.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/slow-destroy.php", "echo", "pipes") },
pipe.NewPipeFactory(),
&Config{
NumWorkers: 5,
@@ -479,7 +479,7 @@ func Test_Static_Pool_Handle_Dead(t *testing.T) {
func Test_Static_Pool_Slow_Destroy(t *testing.T) {
p, err := Initialize(
context.Background(),
- func() *exec.Cmd { return exec.Command("php", "../../tests/slow-destroy.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/slow-destroy.php", "echo", "pipes") },
pipe.NewPipeFactory(),
&Config{
NumWorkers: 5,
@@ -509,7 +509,7 @@ func Test_StaticPool_NoFreeWorkers(t *testing.T) {
p, err := Initialize(
ctx,
// sleep for the 3 seconds
- func() *exec.Cmd { return exec.Command("php", "../../tests/sleep.php", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/sleep.php", "pipes") },
pipe.NewPipeFactory(),
&Config{
Debug: false,
@@ -541,7 +541,7 @@ func Test_StaticPool_NoFreeWorkers(t *testing.T) {
func Test_Static_Pool_WrongCommand1(t *testing.T) {
p, err := Initialize(
context.Background(),
- func() *exec.Cmd { return exec.Command("phg", "../../tests/slow-destroy.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("phg", "../tests/slow-destroy.php", "echo", "pipes") },
pipe.NewPipeFactory(),
&Config{
NumWorkers: 5,
@@ -593,7 +593,7 @@ func Benchmark_Pool_Echo(b *testing.B) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "echo", "pipes") },
pipe.NewPipeFactory(),
cfg,
)
@@ -625,7 +625,7 @@ func Benchmark_Pool_Echo_Batched(b *testing.B) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "echo", "pipes") },
pipe.NewPipeFactory(),
&Config{
NumWorkers: uint64(runtime.NumCPU()),
@@ -667,7 +667,7 @@ func Benchmark_Pool_Echo_Replaced(b *testing.B) {
ctx := context.Background()
p, err := Initialize(
ctx,
- func() *exec.Cmd { return exec.Command("php", "../../tests/client.php", "echo", "pipes") },
+ func() *exec.Cmd { return exec.Command("php", "../tests/client.php", "echo", "pipes") },
pipe.NewPipeFactory(),
&Config{
NumWorkers: 1,