Skip to content

Commit

Permalink
Fix task state check in connector integration tests (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
loicgreffier authored Aug 5, 2024
1 parent a40e7e3 commit 9dfdf79
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ void shouldRestartConnector() throws InterruptedException {
.spec(Topic.TopicSpec.builder()
.partitions(3)
.replicationFactor(1)
.configs(Map.of("cleanup.policy", "delete",
.configs(Map.of(
"cleanup.policy", "delete",
"min.insync.replicas", "1",
"retention.ms", "60000"))
.build())
Expand Down Expand Up @@ -449,7 +450,6 @@ void shouldRestartConnector() throws InterruptedException {
.body(connector));

forceConnectorSynchronization();
waitForConnectorAndTasksToBeInState("ns1-co1", Connector.TaskState.RUNNING);

ChangeConnectorState restartState = ChangeConnectorState.builder()
.metadata(Metadata.builder()
Expand All @@ -469,6 +469,8 @@ void shouldRestartConnector() throws InterruptedException {

assertEquals(HttpStatus.OK, restartResponse.status());

waitForConnectorAndTasksToBeInState("ns1-co1", Connector.TaskState.RUNNING);

ConnectorStateInfo actual = connectClient
.toBlocking()
.retrieve(HttpRequest.GET("/connectors/ns1-co1/status"), ConnectorStateInfo.class);
Expand Down

0 comments on commit 9dfdf79

Please sign in to comment.