Fix worker random test.
This commit is contained in:
committed by
Nikolay Igotti
parent
c322d432a0
commit
cedcd2cf79
@@ -28,9 +28,11 @@ fun testRandomWorkers() {
|
|||||||
})
|
})
|
||||||
// Now collect all results into current attempt's list
|
// Now collect all results into current attempt's list
|
||||||
val futureSet = futures.toSet()
|
val futureSet = futures.toSet()
|
||||||
for (i in 0 until futureSet.size) {
|
var finished = 0
|
||||||
|
while (finished < futureSet.size) {
|
||||||
val ready = waitForMultipleFutures(futureSet, 10000)
|
val ready = waitForMultipleFutures(futureSet, 10000)
|
||||||
ready.forEach { results[attempt].addAll(it.result) }
|
ready.forEach { results[attempt].addAll(it.result) }
|
||||||
|
finished += ready.size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user