@@ -278,7 +278,6 @@ void shouldCreateAndAssociateTags() {
278278
279279 @ Test
280280 void shouldDeleteTopicNoTags () throws ExecutionException , InterruptedException , TimeoutException {
281- when (managedClusterProperties .isConfluentCloud ()).thenReturn (true );
282281 when (deleteTopicsResult .all ()).thenReturn (kafkaFuture );
283282 when (adminClient .deleteTopics (anyList ())).thenReturn (deleteTopicsResult );
284283 when (managedClusterProperties .getAdminClient ()).thenReturn (adminClient );
@@ -293,44 +292,15 @@ void shouldDeleteTopicNoTags() throws ExecutionException, InterruptedException,
293292
294293 topicAsyncExecutor .deleteTopic (topic );
295294
296- verify (schemaRegistryClient , never ()).dissociateTag (any (), any (), any ());
297- }
298-
299- @ Test
300- void shouldDeleteTopicSelfManagedCluster () throws ExecutionException , InterruptedException , TimeoutException {
301- when (managedClusterProperties .isConfluentCloud ()).thenReturn (false );
302- when (deleteTopicsResult .all ()).thenReturn (kafkaFuture );
303- when (adminClient .deleteTopics (anyList ())).thenReturn (deleteTopicsResult );
304- when (managedClusterProperties .getAdminClient ()).thenReturn (adminClient );
305-
306- Topic topic = Topic .builder ()
307- .metadata (Metadata .builder ()
308- .name (TOPIC_NAME )
309- .build ())
310- .spec (Topic .TopicSpec .builder ()
311- .build ())
312- .build ();
313-
314- topicAsyncExecutor .deleteTopic (topic );
315-
316- verify (schemaRegistryClient , never ()).dissociateTag (any (), any (), any ());
295+ verify (adminClient ).deleteTopics (anyList ());
317296 }
318297
319298 @ Test
320299 void shouldDeleteTopicAndTags () throws ExecutionException , InterruptedException , TimeoutException {
321- Properties properties = new Properties ();
322- properties .put (CLUSTER_ID , CLUSTER_ID_TEST );
323-
324- when (managedClusterProperties .isConfluentCloud ()).thenReturn (true );
325300 when (deleteTopicsResult .all ()).thenReturn (kafkaFuture );
326301 when (adminClient .deleteTopics (anyList ())).thenReturn (deleteTopicsResult );
327302 when (managedClusterProperties .getAdminClient ()).thenReturn (adminClient );
328303 when (managedClusterProperties .getName ()).thenReturn (LOCAL_CLUSTER );
329- when (managedClusterProperties .getConfig ()).thenReturn (properties );
330- when (schemaRegistryClient .dissociateTag (anyString (),
331- anyString (), anyString ()))
332- .thenReturn (Mono .just (HttpResponse .ok ()))
333- .thenReturn (Mono .error (new Exception ("error" )));
334304
335305 Topic topic = Topic .builder ()
336306 .metadata (Metadata .builder ()
@@ -343,7 +313,7 @@ void shouldDeleteTopicAndTags() throws ExecutionException, InterruptedException,
343313
344314 topicAsyncExecutor .deleteTopic (topic );
345315
346- verify (schemaRegistryClient ). dissociateTag ( LOCAL_CLUSTER , CLUSTER_ID_TEST + ":" + TOPIC_NAME , TAG1 );
316+ verify (adminClient ). deleteTopics ( anyList () );
347317 }
348318
349319 @ Test
0 commit comments