Skip to content

Commit 32d3cb8

Browse files
authored
Merge pull request #289 from cmsegal/fix-test-helper-function
Small fix in newBroadcasters test helper function
2 parents e74f423 + 20f742f commit 32d3cb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crdt_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,16 @@ type mockBroadcaster struct {
9898
ctx context.Context
9999
chans []chan []byte
100100
myChan chan []byte
101-
dropProb *atomic.Int64 // probability of dropping a message instead of receiving it
101+
dropProb *atomic.Int64 // probability of dropping a message instead of broadcasting it
102102
t testing.TB
103103
}
104104

105105
func newBroadcasters(t testing.TB, n int) ([]*mockBroadcaster, context.CancelFunc) {
106106
ctx, cancel := context.WithCancel(context.Background())
107107
broadcasters := make([]*mockBroadcaster, n)
108108
chans := make([]chan []byte, n)
109-
dropP := &atomic.Int64{}
110109
for i := range chans {
110+
dropP := &atomic.Int64{}
111111
chans[i] = make(chan []byte, 300)
112112
broadcasters[i] = &mockBroadcaster{
113113
ctx: ctx,

0 commit comments

Comments
 (0)