Browse Source

remove thread_id from result object, to make unittests green again, because the value of "thread_id" is unpredictable.

JSON-153_experimental
Roker 2 years ago
parent
commit
8f609bf8b7
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      server/unittest_rpc.cc

+ 4
- 1
server/unittest_rpc.cc View File

@ -164,5 +164,8 @@ TEST_P( RpcTest, Meh )
auto r = request;
const js::Value actual_result = call( test_functions, request.get_obj(), &dummyContext);
EXPECT_EQ( expected_result, actual_result );
js::Object result_obj = actual_result.get_obj();
js::Object::iterator q = std::find_if(result_obj.begin(), result_obj.end(), [](const js::Pair& v){ return js::Config::get_name(v) == "thread_id"; } );
result_obj.erase( q );
EXPECT_EQ( expected_result, result_obj );
}

Loading…
Cancel
Save