Skip to content

Commit ba3587b

Browse files
committed
Handle error and accidentally fix a flakey failure
1 parent d5c5922 commit ba3587b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

foundation/bus/bus/reqreply_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import (
44
"fmt"
55
"testing"
66

7+
"github.com/stretchr/testify/require"
8+
79
"github.com/suborbital/e2core/foundation/bus/testutil"
810
)
911

@@ -41,10 +43,11 @@ func TestRequestReplyAsync(t *testing.T) {
4143

4244
counter := testutil.NewAsyncCounter(10)
4345

44-
p1.Send(NewMsg(MsgTypeDefault, []byte("joey"))).OnReply(func(msg Message) error {
46+
err := p1.Send(NewMsg(MsgTypeDefault, []byte("joey"))).OnReply(func(msg Message) error {
4547
counter.Count()
4648
return nil
4749
})
50+
require.NoError(t, err, "p1.Send encountered an error")
4851

4952
p2 := g.ConnectWithReplay()
5053
p2.On(func(msg Message) error {

0 commit comments

Comments
 (0)