1 #include <THD/base/data_channels/DataChannelTCP.hpp> 2 #include <THD/test/TestUtils.hpp> 9 constexpr
int WORKERS_NUM = 2;
10 constexpr
int MASTER_PORT = 45680;
13 setenv(WORLD_SIZE_ENV, std::to_string((WORKERS_NUM + 1)).data(), 1);
14 setenv(RANK_ENV,
"0", 1);
15 setenv(MASTER_PORT_ENV, std::to_string(MASTER_PORT).data(), 1);
16 auto masterChannel = std::make_shared<thd::DataChannelTCP>(
17 thd::getInitConfig(
"env://"), 2000);
19 ASSERT_THROWS(std::exception, masterChannel->init())
23 std::thread master_thread(master);
25 std::cout <<
"OK" << std::endl;