lichao
2021-06-23 c1e39e20ca42b21eeac8b5068fa1f921bf9a070f
utest/api_test.cpp
@@ -256,14 +256,21 @@
         printf("proc [%d] %s, %s, %s\n\ttopics\n", i,
                (info.online() ? "online" : "offline"),
                info.proc().proc_id().c_str(), info.proc().name().c_str());
         for (auto &t : info.topics().topic_list()) {
            printf("\t\t %s\n", t.c_str());
         }
         auto PrintTopics = [](std::string const &name, auto &topic_list) {
            printf("%s:[", name.c_str());
            for (auto &t : topic_list) {
               printf("%s,", t.c_str());
            }
            printf("]\n");
         };
         PrintTopics("service", info.service().topic_list());
         PrintTopics("local_sub", info.local_sub().topic_list());
         PrintTopics("net_sub", info.net_sub().topic_list());
         printf("\n");
      }
      printf("\n");
   };
   if (0) {
   if (1) {
      // query procs
      std::string dest(BHAddress().SerializeAsString());
      MsgQueryProc query;
@@ -293,8 +300,8 @@
      host.set_ip("127.0.0.1");
      host.set_port(kBHCenterPort);
      // center topic node address.
      host.set_mq_id(201);
      host.set_abs_addr(10072);
      // host.set_mq_id(201);
      // host.set_abs_addr(10072);
      std::string dest(host.SerializeAsString());
      void *proc_id = 0;