@@ -278,7 +278,6 @@ void shouldCreateAndAssociateTags() {
278
278
279
279
@ Test
280
280
void shouldDeleteTopicNoTags () throws ExecutionException , InterruptedException , TimeoutException {
281
- when (managedClusterProperties .isConfluentCloud ()).thenReturn (true );
282
281
when (deleteTopicsResult .all ()).thenReturn (kafkaFuture );
283
282
when (adminClient .deleteTopics (anyList ())).thenReturn (deleteTopicsResult );
284
283
when (managedClusterProperties .getAdminClient ()).thenReturn (adminClient );
@@ -293,44 +292,15 @@ void shouldDeleteTopicNoTags() throws ExecutionException, InterruptedException,
293
292
294
293
topicAsyncExecutor .deleteTopic (topic );
295
294
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 ());
317
296
}
318
297
319
298
@ Test
320
299
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 );
325
300
when (deleteTopicsResult .all ()).thenReturn (kafkaFuture );
326
301
when (adminClient .deleteTopics (anyList ())).thenReturn (deleteTopicsResult );
327
302
when (managedClusterProperties .getAdminClient ()).thenReturn (adminClient );
328
303
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" )));
334
304
335
305
Topic topic = Topic .builder ()
336
306
.metadata (Metadata .builder ()
@@ -343,7 +313,7 @@ void shouldDeleteTopicAndTags() throws ExecutionException, InterruptedException,
343
313
344
314
topicAsyncExecutor .deleteTopic (topic );
345
315
346
- verify (schemaRegistryClient ). dissociateTag ( LOCAL_CLUSTER , CLUSTER_ID_TEST + ":" + TOPIC_NAME , TAG1 );
316
+ verify (adminClient ). deleteTopics ( anyList () );
347
317
}
348
318
349
319
@ Test
0 commit comments