MCPcopy Create free account
hub / github.com/Tencent/phxqueue / TestGlobalConfig

Method TestGlobalConfig

phxqueue/test/test_config.cpp:26–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24using namespace std;
25
26void 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
50void TestConfig::TestTopicConfig(const config::TopicConfig *topic_config) {
51 // 1->1, 2

Callers

nothing calls this directly

Calls 5

GetConsumerConfigMethod · 0.80
GetStoreConfigMethod · 0.80
GetSchedulerConfigMethod · 0.80
GetLockConfigMethod · 0.80

Tested by

no test coverage detected