Skip to content

Commit

Permalink
adapt to connect retry mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
Dugong42 committed Jan 3, 2025
1 parent cb06d48 commit 77b5a70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ public Mono<ResponseEntity<Void>> resumeConnectorWithHttpInfo(String connectorNa
return withRetryOnConflictOrRebalance(super.resumeConnectorWithHttpInfo(connectorName));
}

@Override
public Mono<ResponseEntity<Void>> resetConnectorOffsets(String connectorName)
throws WebClientResponseException {
return withRetryOnConflictOrRebalance(super.resetConnectorOffsets(connectorName));
}

@Override
public Mono<ResponseEntity<Connector>> setConnectorConfigWithHttpInfo(String connectorName,
Map<String, Object> requestBody)
Expand Down
12 changes: 1 addition & 11 deletions api/src/test/java/io/kafbat/ui/KafkaConnectServiceTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,10 @@ public void setUp() {
"file", "/tmp/test",
"test.password", "test-credentials")))
.exchange()
.expectStatus().isOk()
.expectBody()
.returnResult();

webTestClient.get()
.uri("/api/clusters/{clusterName}/connects/{connectName}/connectors/{connectorName}",
LOCAL, connectName, connectorName)
.exchange()
.expectStatus().isOk();

// Kafka Connect may return transient HTTP 500 errors during rebalances
if (creationResult.getStatus() != HttpStatus.OK) {
log.warn(
"Ignoring a transient error while setting up the tested connector, because it has been created anyway.");
}
}

@AfterEach
Expand Down

0 comments on commit 77b5a70

Please sign in to comment.