diff options
author | Valery Piashchynski <[email protected]> | 2020-11-26 12:55:50 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-26 12:55:50 +0300 |
commit | c765c70c1ff628044ccae15a24d0e200bb9304cb (patch) | |
tree | b23fbd875dd624e95bb54e193f1d56cb41d9283d /pipe_factory_test.go | |
parent | 574f351aaecdee1176b9700bb6d7eb61fe170906 (diff) |
Remove context from Wait in all tests
Diffstat (limited to 'pipe_factory_test.go')
-rwxr-xr-x | pipe_factory_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pipe_factory_test.go b/pipe_factory_test.go index ee2510f3..bdb861de 100755 --- a/pipe_factory_test.go +++ b/pipe_factory_test.go @@ -18,8 +18,7 @@ func Test_Pipe_Start(t *testing.T) { assert.NotNil(t, w) go func() { - ctx := context.Background() - assert.NoError(t, w.Wait(ctx)) + assert.NoError(t, w.Wait()) }() assert.NoError(t, w.Stop(ctx)) @@ -142,7 +141,7 @@ func Benchmark_Pipe_SpawnWorker_Stop(b *testing.B) { cmd := exec.Command("php", "tests/client.php", "echo", "pipes") w, _ := f.SpawnWorkerWithContext(context.Background(), cmd) go func() { - if w.Wait(context.Background()) != nil { + if w.Wait() != nil { b.Fail() } }() @@ -165,7 +164,7 @@ func Benchmark_Pipe_Worker_ExecEcho(b *testing.B) { b.ReportAllocs() b.ResetTimer() go func() { - err := w.Wait(context.Background()) + err := w.Wait() if err != nil { b.Errorf("error waiting the worker: error %v", err) } |