Skip to content

Commit

Permalink
Increase query timeout in testDeleteRowsConcurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Jan 12, 2024
1 parent dcf2e5c commit 035806c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import java.util.stream.IntStream;
import java.util.stream.Stream;

import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.ImmutableList.toImmutableList;
import static io.airlift.concurrent.MoreFutures.tryGetFutureValue;
import static io.trino.plugin.iceberg.IcebergTestUtils.getFileSystemFactory;
Expand Down Expand Up @@ -156,7 +157,9 @@ public void testDeleteRowsConcurrently()
.collect(toImmutableList());

Stream<Optional<String>> expectedRows = Streams.mapWithIndex(futures.stream(), (future, index) -> {
boolean deleteSuccessful = tryGetFutureValue(future, 10, SECONDS).orElseThrow();
Optional<Boolean> value = tryGetFutureValue(future, 20, SECONDS);
checkState(value.isPresent(), "Task %s did not complete in time", index);
boolean deleteSuccessful = value.get();
return deleteSuccessful ? Optional.empty() : Optional.of(rows.get((int) index));
});
List<String> expectedValues = expectedRows.filter(Optional::isPresent).map(Optional::get).collect(toImmutableList());
Expand Down

0 comments on commit 035806c

Please sign in to comment.