1616import com .linkedin .venice .pubsub .PubSubConsumerAdapterContext ;
1717import com .linkedin .venice .pubsub .PubSubPositionTypeRegistry ;
1818import com .linkedin .venice .pubsub .PubSubProducerAdapterContext ;
19+ import com .linkedin .venice .pubsub .PubSubTopicConfiguration ;
1920import com .linkedin .venice .pubsub .PubSubTopicPartitionImpl ;
2021import com .linkedin .venice .pubsub .PubSubTopicRepository ;
2122import com .linkedin .venice .pubsub .api .PubSubAdminAdapter ;
3839import java .util .Arrays ;
3940import java .util .List ;
4041import java .util .Map ;
42+ import java .util .Optional ;
4143import java .util .Properties ;
4244import java .util .concurrent .CompletableFuture ;
4345import java .util .concurrent .CountDownLatch ;
@@ -503,8 +505,8 @@ public void testUncleanLeaderElectionConfigForRealtimeTopic() {
503505 int replicationFactor = 1 ;
504506 long retentionTimeMs = 24 * 60 * 60 * 1000L ; // 24 hours
505507 boolean logCompaction = false ;
506- java . util . Optional <Integer > minIsr = java . util . Optional .of (1 );
507- java . util . Optional <Boolean > uncleanLeaderElection = java . util . Optional .of (false );
508+ Optional <Integer > minIsr = Optional .of (1 );
509+ Optional <Boolean > uncleanLeaderElection = Optional .of (false );
508510
509511 // Create RT topic with unclean leader election disabled
510512 topicManager .createTopic (
@@ -523,7 +525,7 @@ public void testUncleanLeaderElectionConfigForRealtimeTopic() {
523525 });
524526
525527 // Retrieve the topic configuration and verify unclean leader election is set to false
526- com . linkedin . venice . pubsub . PubSubTopicConfiguration topicConfig = topicManager .getTopicConfig (rtTopic );
528+ PubSubTopicConfiguration topicConfig = topicManager .getTopicConfig (rtTopic );
527529 assertNotNull (topicConfig , "Topic configuration should not be null" );
528530 assertTrue (
529531 topicConfig .getUncleanLeaderElectionEnable ().isPresent (),
@@ -549,14 +551,14 @@ public void testUncleanLeaderElectionConfigForRealtimeTopic() {
549551 retentionTimeMs ,
550552 logCompaction ,
551553 minIsr ,
552- java . util . Optional .of (false ),
554+ Optional .of (false ),
553555 false );
554556
555557 waitForNonDeterministicAssertion (1 , TimeUnit .MINUTES , () -> {
556558 assertTrue (topicManager .containsTopic (rtTopic2 ), "Second RT topic should be created" );
557559 });
558560
559- com . linkedin . venice . pubsub . PubSubTopicConfiguration rtTopic2Config = topicManager .getTopicConfig (rtTopic2 );
561+ PubSubTopicConfiguration rtTopic2Config = topicManager .getTopicConfig (rtTopic2 );
560562 assertNotNull (rtTopic2Config , "Second RT topic configuration should not be null" );
561563 assertTrue (
562564 rtTopic2Config .getUncleanLeaderElectionEnable ().isPresent (),
@@ -574,15 +576,14 @@ public void testUncleanLeaderElectionConfigForRealtimeTopic() {
574576 retentionTimeMs ,
575577 logCompaction ,
576578 minIsr ,
577- java . util . Optional .of (true ),
579+ Optional .of (true ),
578580 false );
579581
580582 waitForNonDeterministicAssertion (1 , TimeUnit .MINUTES , () -> {
581583 assertTrue (topicManager .containsTopic (rtTopicWithUncleanEnabled ), "RT topic should be created" );
582584 });
583585
584- com .linkedin .venice .pubsub .PubSubTopicConfiguration rtConfigWithUncleanEnabled =
585- topicManager .getTopicConfig (rtTopicWithUncleanEnabled );
586+ PubSubTopicConfiguration rtConfigWithUncleanEnabled = topicManager .getTopicConfig (rtTopicWithUncleanEnabled );
586587 assertTrue (
587588 rtConfigWithUncleanEnabled .getUncleanLeaderElectionEnable ().isPresent (),
588589 "Unclean leader election config should be present" );
0 commit comments