Skip to content

Commit

Permalink
Fix: Use QuotaManager mock in cli unit tests (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovic-boutros authored Apr 3, 2024
1 parent f1fe064 commit 40d70a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/java/com/purbon/kafka/topology/JulieOpsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public void builderRunTestAsFromCLI() throws Exception {
builder.setAccessControlManager(accessControlManager);
builder.setConnectorManager(connectorManager);
builder.setKSqlArtefactManager(ksqlArtefactManager);
builder.setQuotasManager(quotasManager);

doNothing().when(topicManager).updatePlan(any(ExecutionPlan.class), any(Map.class));

Expand All @@ -162,6 +163,7 @@ public void builderRunTestAsFromCLI() throws Exception {
verify(topicManager, times(1)).updatePlan(any(ExecutionPlan.class), any(Map.class));
verify(accessControlManager, times(1)).updatePlan(any(ExecutionPlan.class), any(Map.class));
verify(connectorManager, times(1)).updatePlan(any(ExecutionPlan.class), any(Map.class));
verify(quotasManager, times(1)).updatePlan(any(ExecutionPlan.class), any(Map.class));
}

@Test
Expand Down Expand Up @@ -217,6 +219,7 @@ public void builderRunTestAsFromCLIWithARedisBackend() throws Exception {
builder.setAccessControlManager(accessControlManager);
builder.setConnectorManager(connectorManager);
builder.setKSqlArtefactManager(ksqlArtefactManager);
builder.setQuotasManager(quotasManager);

doNothing().when(topicManager).updatePlan(any(ExecutionPlan.class), any(Map.class));

Expand All @@ -228,6 +231,7 @@ public void builderRunTestAsFromCLIWithARedisBackend() throws Exception {
verify(stateProcessor, times(1)).createOrOpen();
verify(topicManager, times(1)).updatePlan(any(ExecutionPlan.class), any(Map.class));
verify(accessControlManager, times(1)).updatePlan(any(ExecutionPlan.class), any(Map.class));
verify(quotasManager, times(1)).updatePlan(any(ExecutionPlan.class), any(Map.class));
}

@Test
Expand Down

0 comments on commit 40d70a6

Please sign in to comment.