Skip to content

Commit

Permalink
[hotfix][tests] Strip CompletionExceptions in MiniClusterClient#guard…
Browse files Browse the repository at this point in the history
…WithSingleRetry
  • Loading branch information
zentol committed Mar 12, 2018
1 parent 7cea425 commit d5fc25e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.apache.flink.runtime.util.ExecutorThreadFactory;
import org.apache.flink.runtime.util.LeaderConnectionInfo;
import org.apache.flink.runtime.util.LeaderRetrievalUtils;
import org.apache.flink.util.ExceptionUtils;
import org.apache.flink.util.FlinkException;

import javax.annotation.Nonnull;
Expand Down Expand Up @@ -197,7 +198,10 @@ private static <X> CompletableFuture<X> guardWithSingleRetry(Supplier<Completabl
operation,
1,
Time.milliseconds(500),
throwable -> throwable instanceof FencingTokenException || throwable instanceof AkkaRpcException,
throwable -> {
Throwable actualException = ExceptionUtils.stripCompletionException(throwable);
return actualException instanceof FencingTokenException || actualException instanceof AkkaRpcException;
},
executor);
}
}

0 comments on commit d5fc25e

Please sign in to comment.