Skip to content

Commit

Permalink
Handle error and accidentally fix a flakey failure
Browse files Browse the repository at this point in the history
  • Loading branch information
javorszky committed Mar 20, 2023
1 parent d5c5922 commit ba3587b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion foundation/bus/bus/reqreply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"fmt"
"testing"

"github.com/stretchr/testify/require"

"github.com/suborbital/e2core/foundation/bus/testutil"
)

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

counter := testutil.NewAsyncCounter(10)

p1.Send(NewMsg(MsgTypeDefault, []byte("joey"))).OnReply(func(msg Message) error {
err := p1.Send(NewMsg(MsgTypeDefault, []byte("joey"))).OnReply(func(msg Message) error {
counter.Count()
return nil
})
require.NoError(t, err, "p1.Send encountered an error")

p2 := g.ConnectWithReplay()
p2.On(func(msg Message) error {
Expand Down

0 comments on commit ba3587b

Please sign in to comment.