Skip to content

Commit

Permalink
test FEATURE print op and envp on fail
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Oct 8, 2021
1 parent 3292809 commit 8ec6d81
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/test_parallel_sessions.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,19 @@ send_get_rpc(void *arg)
/* recieve reply, should succeed */
msgtype = nc_recv_reply(nc_sess, rpc, msgid, THREAD_COUNT * 2000, &envp, &op);
assert_int_equal(msgtype, NC_MSG_REPLY);
assert_non_null(op);
assert_non_null(envp);
if (!op || !envp) {
printf("op:\n");
if (op) {
lyd_print_file(stdout, op, LYD_XML, 0);
}
printf("\n");
printf("envp:\n");
if (envp) {
lyd_print_file(stdout, envp, LYD_XML, 0);
}
printf("\n");
fail();
}

nc_rpc_free(rpc);
lyd_free_tree(op);
Expand Down

0 comments on commit 8ec6d81

Please sign in to comment.