Skip to content

Commit

Permalink
Fix issues from review. (but left the assert.NoError at capnproto#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
hspaay committed Jan 2, 2023
1 parent 1603f70 commit 48794db
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,13 @@ func TestServerCall(t *testing.T) {
Impl: nil,
}
sm.Impl = func(ctx context.Context, call *server.Call) error {
t.Log("welcome to blank")
echoArgs := air.Echo_echo_Params(call.Args())
inText, err := echoArgs.In()
assert.NoError(t, err)
proxyReceived.Store(inText)
// pretend we received an answer
echo := air.Echo_echo{Call: call}
resp, err := echo.AllocResults()
resp, _ := echo.AllocResults()
err = resp.SetOut(inText)
return err
}
Expand Down Expand Up @@ -147,11 +146,9 @@ func TestServerCall(t *testing.T) {
resp, err := ans.Struct()
answerOut, _ := resp.Out()
rxValue := proxyReceived.Load()
assert.Equal(t, echoText, rxValue)
require.Equal(t, echoText, rxValue)
assert.Equal(t, echoText, answerOut)
if err != nil {
t.Error("echo.Echo() error != <nil>; want success")
}
assert.NoError(t, err, "echo.Echo() error != <nil>; want success")
})
}

Expand Down

0 comments on commit 48794db

Please sign in to comment.