MCPcopy Create free account
hub / github.com/cucumber/cucumber-cpp / SocketServerTest

Class SocketServerTest

tests/integration/WireServerTest.cpp:56–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54};
55
56class SocketServerTest : public Test {
57
58protected:
59 StrictMock<MockProtocolHandler> protocolHandler;
60 std::future<void> serverThread{};
61
62 void SetUp() override {
63 SocketServer* server = createListeningServer();
64 serverThread = std::async(std::launch::async, &SocketServer::acceptOnce, server);
65 }
66
67 void TearDown() override {
68 serverThread.wait_for(THREAD_TEST_TIMEOUT);
69 destroyListeningServer();
70 }
71
72 virtual SocketServer* createListeningServer() = 0;
73 virtual void destroyListeningServer() = 0;
74};
75
76class TCPSocketServerTest : public SocketServerTest {
77protected:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected