diff --git a/internal/reliabletransport/reliable_ack_test.go b/internal/reliabletransport/reliable_ack_test.go index 8fc9f5ed..e43b0337 100644 --- a/internal/reliabletransport/reliable_ack_test.go +++ b/internal/reliabletransport/reliable_ack_test.go @@ -60,6 +60,39 @@ func TestReliable_ACK(t *testing.T) { }, { name: "five reversed packets", + args: args{ + inputSequence: []string{ + "[5] CONTROL_V1 +1ms", + "[4] CONTROL_V1 +1ms", + "[3] CONTROL_V1 +1ms", + "[2] CONTROL_V1 +1ms", + "[1] CONTROL_V1 +1ms", + }, + start: 1, + wantacks: 5, + }, + }, + { + name: "ten unordered packets with duplicates", + args: args{ + inputSequence: []string{ + "[5] CONTROL_V1 +1ms", + "[1] CONTROL_V1 +1ms", + "[5] CONTROL_V1 +1ms", + "[2] CONTROL_V1 +1ms", + "[1] CONTROL_V1 +1ms", + "[4] CONTROL_V1 +1ms", + "[2] CONTROL_V1 +1ms", + "[3] CONTROL_V1 +1ms", + "[3] CONTROL_V1 +1ms", + "[4] CONTROL_V1 +1ms", + }, + start: 1, + wantacks: 5, + }, + }, + { + name: "ten packets", args: args{ inputSequence: []string{ "[5] CONTROL_V1 +1ms",