Skip to content

Commit

Permalink
Clean up some unused test variables (#321)
Browse files Browse the repository at this point in the history
* Clean up some unused test variables

* change release date
  • Loading branch information
jhendrixMSFT committed Mar 1, 2024
1 parent 24969a1 commit 2dff4b3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 1.0.5 (2024-03-05)
## 1.0.5 (2024-03-04)

### Bugs Fixed

Expand Down
2 changes: 1 addition & 1 deletion helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func sendInitialFlowFrame(t require.TestingT, channel uint16, netConn *fake.NetC
nextIncoming := uint32(0)
count := uint32(0)
available := uint32(0)
b, err := fake.EncodeFrame(frames.TypeAMQP, 0, &frames.PerformFlow{
b, err := fake.EncodeFrame(frames.TypeAMQP, channel, &frames.PerformFlow{
NextIncomingID: &nextIncoming,
IncomingWindow: 1000000,
OutgoingWindow: 1000000,
Expand Down
4 changes: 0 additions & 4 deletions integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@ func TestIntegrationRoundTrip(t *testing.T) {
break
}
receiveCount++
if err != nil {
receiveErr.write(fmt.Errorf("error after %d receives: %+v", i, err))
break
}
}
}()

Expand Down
8 changes: 4 additions & 4 deletions session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,9 @@ func TestSessionFlowFrameWithEcho(t *testing.T) {
}

func TestSessionInvalidAttachDeadlock(t *testing.T) {
var enqueueFrames func(string)
var enqueueFrames func()
responder := func(remoteChannel uint16, req frames.FrameBody) (fake.Response, error) {
switch tt := req.(type) {
switch req.(type) {
case *fake.AMQPProto:
return newResponse(fake.ProtoHeader(fake.ProtoAMQP))
case *frames.PerformOpen:
Expand All @@ -527,7 +527,7 @@ func TestSessionInvalidAttachDeadlock(t *testing.T) {
case *frames.PerformEnd:
return newResponse(fake.PerformEnd(0, nil))
case *frames.PerformAttach:
enqueueFrames(tt.Name)
enqueueFrames()
return fake.Response{}, nil
case *frames.PerformClose:
return newResponse(fake.PerformClose(nil))
Expand All @@ -547,7 +547,7 @@ func TestSessionInvalidAttachDeadlock(t *testing.T) {
cancel()
require.NoError(t, err)

enqueueFrames = func(n string) {
enqueueFrames = func() {
// send an invalid attach response
b, err := fake.EncodeFrame(frames.TypeAMQP, 0, &frames.PerformAttach{
Name: "mismatched",
Expand Down

0 comments on commit 2dff4b3

Please sign in to comment.