This is an automated email from the ASF dual-hosted git repository.

vinodkone pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 0a6cf7639bf71e6333ef541f001f5885ac00b2d5
Author: Abdul Qadeer <quadeer....@gmail.com>
AuthorDate: Thu Dec 3 16:43:06 2020 -0800

    Update ProcessTest.Remote
---
 3rdparty/libprocess/src/tests/process_tests.cpp | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/3rdparty/libprocess/src/tests/process_tests.cpp 
b/3rdparty/libprocess/src/tests/process_tests.cpp
index 42295a6..eabd70e 100644
--- a/3rdparty/libprocess/src/tests/process_tests.cpp
+++ b/3rdparty/libprocess/src/tests/process_tests.cpp
@@ -1445,9 +1445,11 @@ TEST_F(ProcessTest, Remote)
   RemoteProcess process;
   spawn(process);
 
-  Future<Nothing> handler;
+  Future<UPID> pid;
+  Future<string> body;
   EXPECT_CALL(process, handler(_, _))
-    .WillOnce(FutureSatisfy(&handler));
+    .WillOnce(DoAll(FutureArg<0>(&pid),
+                    FutureArg<1>(&body)));
 
   Try<Socket> create = Socket::create();
   ASSERT_SOME(create);
@@ -1463,12 +1465,17 @@ TEST_F(ProcessTest, Remote)
   message.name = "handler";
   message.from = UPID("sender", sender.get());
   message.to = process.self();
+  message.body = "hello world";
 
   const string data = MessageEncoder::encode(message);
 
   AWAIT_READY(socket.send(data));
 
-  AWAIT_READY(handler);
+  AWAIT_READY(body);
+  ASSERT_EQ("hello world", body.get());
+
+  AWAIT_READY(pid);
+  ASSERT_EQ(message.from, pid.get());
 
   terminate(process);
   wait(process);

Reply via email to