The fake session needs to include the reply element in the response envelope. And the is_reply flag was set to the wrong value for replies (it was false as well).
@@ -749,7 +749,7 @@ protected:
{
return (mccs_.groupRecvMsgAsync(
bind(&AsyncReceiveCCSessionTest::callback, this, next_flag_ ++, _1,
- _2, _3), false, seq));
+ _2, _3), true, seq));
}
/// \brief Check the next called callback was with this flag
void called(int flag) {
@@ -139,6 +139,9 @@ FakeSession::recvmsg(ConstElementPtr& env, ConstElementPtr& msg, bool nonblock,
ElementPtr new_env = Element::createMap();
new_env->set("group", c_m->get(0));
new_env->set("to", c_m->get(1));
+ if (c_m->get(3)->intValue() != -1) {
+ new_env->set("reply", c_m->get(3));
+ }
env = new_env;
msg = c_m->get(2);
to_remove = c_m;