mirror of https://github.com/apache/kafka.git
MINOR: Fix retry logic in DedicatedMirrorIntegrationTest::awaitTaskConfigurations (#16525)
Reviewers: Greg Harris <greg.harris@aiven.io>
This commit is contained in:
parent
e2ec389a7c
commit
515cdbb707
|
@ -50,6 +50,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
@ -353,9 +354,9 @@ public class DedicatedMirrorIntegrationTest {
|
|||
.stream()
|
||||
.map(TaskInfo::config)
|
||||
.allMatch(predicate);
|
||||
} catch (Exception ex) {
|
||||
if (ex instanceof RebalanceNeededException) {
|
||||
// RebalanceNeededException should be retry-able.
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof RebalanceNeededException) {
|
||||
// RebalanceNeededException should be retriable
|
||||
// This happens when a worker has read a new config from the config topic, but hasn't completed the
|
||||
// subsequent rebalance yet
|
||||
throw ex;
|
||||
|
|
Loading…
Reference in New Issue