mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [mesos] zorro786 commented on a change in pull request #371: [MESOS-10199] Fix Host field in client headers
Date Thu, 10 Dec 2020 03:13:35 GMT

zorro786 commented on a change in pull request #371:

File path: 3rdparty/libprocess/src/tests/process_tests.cpp
@@ -1463,12 +1465,17 @@ TEST_F(ProcessTest, Remote) = "handler";
   message.from = UPID("sender", sender.get()); = process.self();
+  message.body = "hello world";
   const string data = MessageEncoder::encode(message);
-  AWAIT_READY(handler);
+  AWAIT_READY(body);
+  ASSERT_EQ("hello world", body.get());
+  AWAIT_READY(pid);
+  ASSERT_EQ(message.from, pid.get());

Review comment:
       No it won't, it is just the pid of the sender process. Regardless of what the header
is set this should succeed.
   I actually wanted to write a Unit Test to verify host header being set at the receiver,
however it is not straightforward to me from code to get host headers from libprocess' process.
Message handlers in `process/process.hpp` seem to only care about process id and message body.
I added the above as an Integration Test to verify connectivity/data transfer with changed

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message