diff options
author | Wolfy-J <[email protected]> | 2018-05-29 13:03:34 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-05-29 13:03:34 +0300 |
commit | b8bc792b263a3891e125757a35cc563bb85f1a0b (patch) | |
tree | f7a9e6f2568220491a26f6544e4acf0ed62012bb /worker_test.go | |
parent | 50f820833eeef8518b3b978b33c6f20391225162 (diff) |
nested observers
Diffstat (limited to 'worker_test.go')
-rw-r--r-- | worker_test.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/worker_test.go b/worker_test.go index de11226a..e1af13c4 100644 --- a/worker_test.go +++ b/worker_test.go @@ -8,7 +8,7 @@ import ( ) func Test_GetState(t *testing.T) { - cmd := exec.Command("php", "tests/client.php", "echo", "pipes") + cmd := exec.Command("php", "php/tests/client.php", "echo", "pipes") w, err := NewPipeFactory().SpawnWorker(cmd) go func() { @@ -24,7 +24,7 @@ func Test_GetState(t *testing.T) { } func Test_Echo(t *testing.T) { - cmd := exec.Command("php", "tests/client.php", "echo", "pipes") + cmd := exec.Command("php", "php/tests/client.php", "echo", "pipes") w, _ := NewPipeFactory().SpawnWorker(cmd) go func() { @@ -43,16 +43,16 @@ func Test_Echo(t *testing.T) { } func Test_NotStarted_String(t *testing.T) { - cmd := exec.Command("php", "tests/client.php", "echo", "pipes") + cmd := exec.Command("php", "php/tests/client.php", "echo", "pipes") w, _ := newWorker(cmd) - assert.Contains(t, w.String(), "php tests/client.php echo pipes") + assert.Contains(t, w.String(), "php php/tests/client.php echo pipes") assert.Contains(t, w.String(), "inactive") assert.Contains(t, w.String(), "numExecs: 0") } func Test_String(t *testing.T) { - cmd := exec.Command("php", "tests/client.php", "echo", "pipes") + cmd := exec.Command("php", "php/tests/client.php", "echo", "pipes") w, _ := NewPipeFactory().SpawnWorker(cmd) go func() { @@ -60,13 +60,13 @@ func Test_String(t *testing.T) { }() defer w.Stop() - assert.Contains(t, w.String(), "php tests/client.php echo pipes") + assert.Contains(t, w.String(), "php php/tests/client.php echo pipes") assert.Contains(t, w.String(), "ready") assert.Contains(t, w.String(), "numExecs: 0") } func Test_Echo_Slow(t *testing.T) { - cmd := exec.Command("php", "tests/slow-client.php", "echo", "pipes", "10", "10") + cmd := exec.Command("php", "php/tests/slow-client.php", "echo", "pipes", "10", "10") w, _ := NewPipeFactory().SpawnWorker(cmd) go func() { @@ -85,7 +85,7 @@ func Test_Echo_Slow(t *testing.T) { } func Test_Broken(t *testing.T) { - cmd := exec.Command("php", "tests/client.php", "broken", "pipes") + cmd := exec.Command("php", "php/tests/client.php", "broken", "pipes") w, err := NewPipeFactory().SpawnWorker(cmd) go func() { @@ -101,7 +101,7 @@ func Test_Broken(t *testing.T) { } func Test_OnStarted(t *testing.T) { - cmd := exec.Command("php", "tests/client.php", "broken", "pipes") + cmd := exec.Command("php", "php/tests/client.php", "broken", "pipes") assert.Nil(t, cmd.Start()) w, err := newWorker(cmd) @@ -112,7 +112,7 @@ func Test_OnStarted(t *testing.T) { } func Test_Error(t *testing.T) { - cmd := exec.Command("php", "tests/client.php", "error", "pipes") + cmd := exec.Command("php", "php/tests/client.php", "error", "pipes") w, _ := NewPipeFactory().SpawnWorker(cmd) go func() { @@ -129,7 +129,7 @@ func Test_Error(t *testing.T) { } func Test_NumExecs(t *testing.T) { - cmd := exec.Command("php", "tests/client.php", "echo", "pipes") + cmd := exec.Command("php", "php/tests/client.php", "echo", "pipes") w, _ := NewPipeFactory().SpawnWorker(cmd) go func() { @@ -148,7 +148,7 @@ func Test_NumExecs(t *testing.T) { } func Test_StateUpdated(t *testing.T) { - cmd := exec.Command("php", "tests/client.php", "echo", "pipes") + cmd := exec.Command("php", "php/tests/client.php", "echo", "pipes") w, _ := NewPipeFactory().SpawnWorker(cmd) go func() { |