@@ -453,7 +453,7 @@ public void testNonPartitionedTopics() {
453
453
454
454
@ Test
455
455
public void testCreateNonPartitionedTopic () {
456
- final String topic = "standard-topic-partition -a" ;
456
+ final String topic = "testCreateNonPartitionedTopic -a" ;
457
457
TopicName topicName = TopicName .get (TopicDomain .persistent .value (), testTenant , testNamespace , topic );
458
458
AsyncResponse response = mock (AsyncResponse .class );
459
459
persistentTopics .createNonPartitionedTopic (response , testTenant , testNamespace , topic , true , null );
@@ -476,7 +476,7 @@ public void testCreateNonPartitionedTopic() {
476
476
response = mock (AsyncResponse .class );
477
477
metaResponse = mock (AsyncResponse .class );
478
478
metaResponseCaptor = ArgumentCaptor .forClass (PartitionedTopicMetadata .class );
479
- final String topic2 = "standard-topic-partition -b" ;
479
+ final String topic2 = "testCreateNonPartitionedTopic -b" ;
480
480
TopicName topicName2 = TopicName .get (TopicDomain .persistent .value (), testTenant , testNamespace , topic2 );
481
481
Map <String , String > topicMetadata = Maps .newHashMap ();
482
482
topicMetadata .put ("key1" , "value1" );
@@ -488,6 +488,13 @@ public void testCreateNonPartitionedTopic() {
488
488
testTenant , testNamespace , topic2 , true , false );
489
489
verify (metaResponse , timeout (5000 ).times (1 )).resume (metaResponseCaptor .capture ());
490
490
Assert .assertNull (metaResponseCaptor .getValue ().properties );
491
+ metaResponse = mock (AsyncResponse .class );
492
+ ArgumentCaptor <Map > metaResponseCaptor2 = ArgumentCaptor .forClass (Map .class );
493
+ persistentTopics .getProperties (metaResponse ,
494
+ testTenant , testNamespace , topic2 , true );
495
+ verify (metaResponse , timeout (5000 ).times (1 )).resume (metaResponseCaptor2 .capture ());
496
+ Assert .assertNotNull (metaResponseCaptor2 .getValue ());
497
+ Assert .assertEquals (metaResponseCaptor2 .getValue ().get ("key1" ), "value1" );
491
498
}
492
499
493
500
@ Test
@@ -516,6 +523,12 @@ public void testCreatePartitionedTopic() {
516
523
Assert .assertEquals (responseCaptor2 .getValue ().properties .size (), 1 );
517
524
Assert .assertEquals (responseCaptor2 .getValue ().properties , topicMetadata );
518
525
});
526
+ AsyncResponse response3 = mock (AsyncResponse .class );
527
+ ArgumentCaptor <Map > metaResponseCaptor2 = ArgumentCaptor .forClass (Map .class );
528
+ persistentTopics .getProperties (response3 , testTenant , testNamespace , topicName2 , true );
529
+ verify (response3 , timeout (5000 ).times (1 )).resume (metaResponseCaptor2 .capture ());
530
+ Assert .assertNotNull (metaResponseCaptor2 .getValue ());
531
+ Assert .assertEquals (metaResponseCaptor2 .getValue ().get ("key1" ), "value1" );
519
532
}
520
533
521
534
@ Test
0 commit comments