Skip to content

Commit

Permalink
fix: fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
CookiePieWw committed Jan 16, 2025
1 parent 19409f3 commit a57b6e5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ mod tests {
..Default::default()
};
let kv_backend = Arc::new(MemoryKvBackend::new()) as KvBackendRef;
let topic_pool = KafkaTopicPool::new(config.clone(), kv_backend);
let mut topic_pool = KafkaTopicPool::new(config.clone(), kv_backend);
// Replaces the default topic pool with the constructed topics.
topic_pool.topics.clone_from(&topics);
// Replaces the default selector with a round-robin selector without shuffled.
topic_pool.selector = Arc::new(RoundRobinTopicSelector::default());
topic_pool.init().await.unwrap();

// Selects exactly the number of `num_topics` topics one by one.
Expand Down

0 comments on commit a57b6e5

Please sign in to comment.