| 140 | } |
| 141 | |
| 142 | inline auto MakeDistributedTestConfig(std::string host, std::int32_t port, |
| 143 | std::chrono::seconds timeout, std::int32_t r) { |
| 144 | Json config{Object{}}; |
| 145 | config["dmlc_communicator"] = std::string{"rabit"}; |
| 146 | config["dmlc_tracker_uri"] = host; |
| 147 | config["dmlc_tracker_port"] = port; |
| 148 | config["dmlc_timeout"] = static_cast<std::int64_t>(timeout.count()); |
| 149 | config["dmlc_task_id"] = std::to_string(r); |
| 150 | config["dmlc_retry"] = 2; |
| 151 | return config; |
| 152 | } |
| 153 | |
| 154 | template <typename WorkerFn> |
| 155 | void TestDistributedGlobal(std::int32_t n_workers, WorkerFn worker_fn, bool need_finalize = true, |
no outgoing calls
no test coverage detected