Skip to content

Commit c69d248

Browse files
committed
Check no message remains after truncated receive - #77
1 parent 1a8f533 commit c69d248

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

largemessage_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,10 @@ func TestTruncatedTextMessage(t *testing.T) {
420420
defer consumer2.Close()
421421
}
422422

423-
// Attempt to receive a message, and don't worry whether it does or not.
424-
consumer2.ReceiveNoWait()
423+
// If the first part of this text was successful then there should be no message to receive.
424+
tidyMsg, tidyErr := consumer2.ReceiveNoWait()
425+
assert.Nil(t, tidyErr)
426+
assert.Nil(t, tidyMsg)
425427

426428
}
427429

0 commit comments

Comments
 (0)