Skip to content

Commit 585d3f5

Browse files
committed
wsd: follow poll naming conventions
Signed-off-by: Rashesh Padia <[email protected]> Change-Id: Ib747c65632f1b30821a0b77a28ee48ae15754800
1 parent fa8db2b commit 585d3f5

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

test/UnitInternalProxy.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ class EchoServerFactory final : public SocketFactory
3636
}
3737
};
3838

39-
/// Test the internal ProxyPoll functionality using production ProxyHandler.
40-
/// Uses the onProxyData hook in UnitWSD to verify data flow.
39+
/// Test the internal ProxyPoll functionality.
4140
class UnitInternalProxy : public UnitWSD
4241
{
4342
bool _tested;
@@ -57,8 +56,8 @@ class UnitInternalProxy : public UnitWSD
5756
UnitInternalProxy()
5857
: UnitWSD("UnitInternalProxy")
5958
, _tested(false)
60-
, _serverPoll(std::make_shared<SocketPoll>("echo-server-poll"))
61-
, _clientPoll(std::make_shared<SocketPoll>("client-poll"))
59+
, _serverPoll(std::make_shared<SocketPoll>("echoserver_poll"))
60+
, _clientPoll(std::make_shared<SocketPoll>("client_poll"))
6261
, _echoPort(0)
6362
, _testPassed(false)
6463
{
@@ -93,7 +92,7 @@ class UnitInternalProxy : public UnitWSD
9392
TST_LOG("Test 1: ProxyPoll singleton...");
9493
ProxyPoll& poll = ProxyPoll::instance();
9594
LOK_ASSERT_MESSAGE("ProxyPoll should be alive", poll.isAlive());
96-
LOK_ASSERT_EQUAL(std::string("proxy-poll"), poll.name());
95+
LOK_ASSERT_EQUAL(std::string("proxy_poll"), poll.name());
9796

9897
TST_LOG("Test 2: Starting echo server...");
9998
if (!startEchoServer())
@@ -204,7 +203,6 @@ class UnitInternalProxy : public UnitWSD
204203
auto proxySocket = StreamSocket::create<StreamSocket>(
205204
std::string(), fds[1], Socket::Type::Unix, false, HostType::Other, proxyHandler);
206205

207-
// Add client socket to poll so it can receive proxied data
208206
_clientPoll->insertNewSocket(clientSocket);
209207

210208
Poco::Net::HTTPRequest request("GET", "/echo/hello-from-ProxyHandler-test", "HTTP/1.1");
@@ -219,7 +217,6 @@ class UnitInternalProxy : public UnitWSD
219217
_targetToClientData.clear();
220218
}
221219

222-
// Start the proxy pump
223220
ProxyPoll::startPump(proxySocket, "127.0.0.1", _echoPort, request);
224221

225222
TST_LOG("startPump called successfully");

wsd/ProxyPoll.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ProxyPoll : public TerminatingPoll
3030

3131
private:
3232
ProxyPoll()
33-
: TerminatingPoll("proxy-poll")
33+
: TerminatingPoll("proxy_poll")
3434
{
3535
startThread(); // Spawns new thread running pollingThread()
3636
}

0 commit comments

Comments
 (0)