failRandomFuture(new ArrayList<>(futures.values())); allFuturesComplete = Futures.allOfWithResults(futures); Assert.assertFalse("allOfWithResults() created a completed future when not all of the futures were previously complete (but one failed).", failRandomFuture(new ArrayList<>(futures.values())); Assert.assertFalse("The result of allOfWithResults() completed when not all the futures completed (except one that failed).", allFuturesComplete.isDone());
failRandomFuture(new ArrayList<>(futures.keySet())); allFuturesComplete = Futures.keysAllOfWithResults(futures); Assert.assertFalse("keysAllOfWithResults() created a completed future when not all of the futures were previously complete (but one failed).", failRandomFuture(new ArrayList<>(futures.keySet())); Assert.assertFalse("The result of keysAllOfWithResults() completed when not all the futures completed (except one that failed).", allFuturesComplete.isDone());
failRandomFuture(futures); allFuturesComplete = Futures.allOfWithResults(futures); Assert.assertFalse("allOfWithResults() created a completed future when not all of the futures were previously complete (but one failed).", failRandomFuture(futures); Assert.assertFalse("The result of allOfWithResults() completed when not all the futures completed (except one that failed).", allFuturesComplete.isDone());
failRandomFuture(futures); allFuturesComplete = Futures.allOf(futures); Assert.assertFalse("allOf() created a completed future when not all of the futures were previously complete (but one failed).", allFuturesComplete.isDone()); failRandomFuture(futures); Assert.assertFalse("The result of allOf() completed when not all the futures completed (except one that failed).", allFuturesComplete.isDone()); completeFutures(futures);