| 71 | } |
| 72 | |
| 73 | virtual void run() { |
| 74 | try { |
| 75 | for (unsigned i = 0; i < PacketCount; ++i) { |
| 76 | m_connection.pushSingle(make_shared<ProtocolRequestPacket>(i)); |
| 77 | EXPECT_TRUE(m_connection.sendAll(SyncWaitMillis)); |
| 78 | EXPECT_TRUE(m_connection.receiveAny(SyncWaitMillis)); |
| 79 | EXPECT_EQ(convert<ProtocolRequestPacket>(m_connection.pullSingle())->requestProtocolVersion, i); |
| 80 | |
| 81 | if (!m_connection.isOpen()) |
| 82 | break; |
| 83 | } |
| 84 | |
| 85 | m_connection.close(); |
| 86 | EXPECT_TRUE(m_connection.pull().empty()); |
| 87 | } catch (std::exception const& e) { |
| 88 | ADD_FAILURE() << "Exception: " << outputException(e, true); |
| 89 | } catch (...) { |
| 90 | ADD_FAILURE(); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | private: |
| 95 | UniverseConnection m_connection; |
nothing calls this directly
no test coverage detected