Skip to content

Commit

Permalink
wip: ack duplicates compare set
Browse files Browse the repository at this point in the history
  • Loading branch information
ainghazal committed Feb 2, 2024
1 parent 31abc06 commit 7b92e6c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions internal/reliabletransport/reliable_ack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 7b92e6c

Please sign in to comment.