Skip to content

Commit

Permalink
chore: Fix test output not randomising split sequence properly
Browse files Browse the repository at this point in the history
  • Loading branch information
driskell committed Feb 11, 2023
1 parent 192b06f commit 248eae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lc-lib/transports/test/transporttest.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (t *transportTest) Factory() transports.TransportFactory {
func (t *transportTest) SendEvents(nonce string, events []*event.Event) error {
endSequence := uint32(len(events))
sequence := endSequence
if sequence > 1 && rand.Intn(1) == 0 {
if sequence > 1 && rand.Intn(2) == 0 {
// Generate a split acknowledgement
sequence = uint32(rand.Intn(int(sequence)-1) + 1)
}
Expand Down

0 comments on commit 248eae1

Please sign in to comment.