summaryrefslogtreecommitdiff
path: root/socket_factory_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-14 23:07:04 +0300
committerValery Piashchynski <[email protected]>2020-12-14 23:07:04 +0300
commitfd0818ef7a8735f5ea3810eb8e0def5f7caae381 (patch)
tree27e8a40f9c4c32c855cf457165aff434cf83c8ac /socket_factory_test.go
parent497112cf98d908c6ad99ac971b9ccd4a8d2f22c3 (diff)
Exeriment with piped stderr
Diffstat (limited to 'socket_factory_test.go')
-rwxr-xr-xsocket_factory_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/socket_factory_test.go b/socket_factory_test.go
index bbe8cc31..9c764ead 100755
--- a/socket_factory_test.go
+++ b/socket_factory_test.go
@@ -2,6 +2,7 @@ package roadrunner
import (
"context"
+ "fmt"
"net"
"os/exec"
"sync"
@@ -209,6 +210,12 @@ func Test_Tcp_Broken(t *testing.T) {
t.Fatal(err)
}
+ sw.AddListener(func(event interface{}) {
+ if ev, ok := event.(WorkerEvent); ok {
+ fmt.Println(string(ev.Payload.([]byte)))
+ }
+ })
+
res, err := sw.Exec(Payload{Body: []byte("hello")})
assert.Error(t, err)
assert.Nil(t, res.Body)