Skip to content

Commit

Permalink
protocol/dataunit: w -> r
Browse files Browse the repository at this point in the history
  • Loading branch information
ydnar committed Dec 5, 2023
1 parent 1094b34 commit f5a0d8c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions protocol/dataunit/client_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ func TestMultipleResponseError(t *testing.T) {

go c.ExchangeDataUnit(ctx, []byte("hello"))

req, w, err := s.ServeDataUnit(ctx)
req, r, err := s.ServeDataUnit(ctx)
if err != nil {
t.Errorf("ExchangeDataUnit(): err == %v", err)
}
err = w.RespondDataUnit(ctx, req)
err = r.RespondDataUnit(ctx, req)
if err != nil {
t.Errorf("RespondDataUnit(): err == %v", err)
}
err = w.RespondDataUnit(ctx, req)
err = r.RespondDataUnit(ctx, req)
wantErr := MultipleResponseError{Index: 0, Count: 2}
if err != wantErr {
t.Errorf("RespondDataUnit(): err == %v, expected %v", err, wantErr)
Expand Down Expand Up @@ -153,15 +153,15 @@ func echoServer(t *testing.T, ctx context.Context, s *Server) error {
reqCtx, cancel := context.WithCancel(ctx)
defer cancel()

req, w, err := s.ServeDataUnit(reqCtx)
req, r, err := s.ServeDataUnit(reqCtx)
if err != nil {
if err == errTestDone {
return
}
t.Errorf("echoServer: ServeDataUnit(): err == %v", err)
}
time.Sleep(randDuration(10 * time.Millisecond))
err = w.RespondDataUnit(reqCtx, req)
err = r.RespondDataUnit(reqCtx, req)
if err != nil {
if err == errTestDone {
return
Expand Down

0 comments on commit f5a0d8c

Please sign in to comment.