| 24 | using namespace std; |
| 25 | |
| 26 | void TestConfig::TestGlobalConfig(config::GlobalConfig *global_config) { |
| 27 | const int topic_id{1000}; |
| 28 | |
| 29 | shared_ptr<const config::TopicConfig> topic_config; |
| 30 | assert(comm::RetCode::RET_OK == global_config->GetTopicConfigByTopicID(topic_id, topic_config)); |
| 31 | TestTopicConfig(topic_config.get()); |
| 32 | |
| 33 | shared_ptr<const config::ConsumerConfig> consumer_config; |
| 34 | assert(comm::RetCode::RET_OK == global_config->GetConsumerConfig(topic_id, consumer_config)); |
| 35 | TestConsumerConfig(consumer_config.get()); |
| 36 | |
| 37 | shared_ptr<const config::StoreConfig> store_config; |
| 38 | assert(comm::RetCode::RET_OK == global_config->GetStoreConfig(topic_id, store_config)); |
| 39 | TestStoreConfig(store_config.get()); |
| 40 | |
| 41 | shared_ptr<const config::SchedulerConfig> scheduler_config; |
| 42 | assert(comm::RetCode::RET_OK == global_config->GetSchedulerConfig(topic_id, scheduler_config)); |
| 43 | TestSchedulerConfig(scheduler_config.get()); |
| 44 | |
| 45 | shared_ptr<const config::LockConfig> lock_config; |
| 46 | assert(comm::RetCode::RET_OK == global_config->GetLockConfig(topic_id, lock_config)); |
| 47 | TestLockConfig(lock_config.get()); |
| 48 | } |
| 49 | |
| 50 | void TestConfig::TestTopicConfig(const config::TopicConfig *topic_config) { |
| 51 | // 1->1, 2 |
nothing calls this directly
no test coverage detected