mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 05:52:20 +08:00
address comments from CR
This commit is contained in:
@ -105,10 +105,15 @@ func TestPeerRepeats(t *testing.T) {
|
||||
|
||||
// Now, if one of the tasks gets finished, the next task off the queue should
|
||||
// be for the same peer
|
||||
tasks[0].Done()
|
||||
for blockI := 0; blockI < 4; blockI++ {
|
||||
for i := 0; i < 4; i++ {
|
||||
// its okay to mark the same task done multiple times here (JUST FOR TESTING)
|
||||
tasks[i].Done()
|
||||
|
||||
ntask := prq.Pop()
|
||||
if ntask.Target != tasks[0].Target {
|
||||
t.Fatal("Expected task from peer with lowest active count")
|
||||
ntask := prq.Pop()
|
||||
if ntask.Target != tasks[i].Target {
|
||||
t.Fatal("Expected task from peer with lowest active count")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user