Fix worker random test.

This commit is contained in:
Nikolay Igotti
2018-11-23 11:13:28 +03:00
committed by Nikolay Igotti
parent c322d432a0
commit cedcd2cf79
@@ -28,9 +28,11 @@ fun testRandomWorkers() {
})
// Now collect all results into current attempt's list
val futureSet = futures.toSet()
for (i in 0 until futureSet.size) {
var finished = 0
while (finished < futureSet.size) {
val ready = waitForMultipleFutures(futureSet, 10000)
ready.forEach { results[attempt].addAll(it.result) }
finished += ready.size
}
}