You're calling run
in both the thread
m_threads.emplace_back(boost::bind(&boost::asio::io_context::run, &m_ioc));
and the google test thread
m_ioc.run();
which is causing the Setup
to block. Try removing m_ioc.run();
since you are already spawning a thread to call io_context::run
.