We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2de213e commit 2399f9aCopy full SHA for 2399f9a
trie/ctrie/ctrie_test.go
@@ -291,7 +291,11 @@ func TestIterator(t *testing.T) {
291
assert.Equal(exp, entry.Value)
292
}
293
close(cancel)
294
- <-iter // Drain anything already put on the channel
+ // Drain anything already put on the channel. Since select chooses a
295
+ // pseudo-random case, we must attempt to drain for every item.
296
+ for i := 0; i < 10; i++ {
297
+ <-iter
298
+ }
299
_, ok = <-iter
300
assert.False(ok)
301
0 commit comments