MINOR: Fix retry logic in DedicatedMirrorIntegrationTest::awaitTaskConfigurations (#16525)

Reviewers: Greg Harris <greg.harris@aiven.io>
This commit is contained in:
Chris Egerton 2024-07-08 20:51:23 +02:00 committed by GitHub
parent e2ec389a7c
commit 515cdbb707
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -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;