+ // ----- wormhole call --------------------------------------------------
+ mbuf = rmr_alloc_msg( ctx, 2048 ); // ensure we have a buffer to pass
+ resp = rmr_wh_call( NULL, 0, NULL, 1, 10 ); // ensure no msg when msg is nil
+ errors += fail_not_nil( resp, "wormhole call given nil context and msg didn't return nil message" );
+
+ resp = rmr_wh_call( NULL, 0, mbuf, 1, 10 ); // ensure invalid state when context is bad
+ errors += fail_if_nil( resp, "wormhole call given nil context and valid msg didn't return message pointer" );
+ if( resp != NULL ) {
+ errors += fail_if_equal( resp->state, RMR_OK, "wormhole call given nil context and valid message returned OK state" );
+ }
+
+ resp = rmr_wh_call( ctx, 2000, mbuf, 1, 10 ); // invalid wormhole id
+ errors += fail_if_nil( resp, "wormhole call given bad whid returned no msg" );
+ if( resp ) {
+ errors += fail_if_equal( resp->state, RMR_OK, "wormhole call given bad whid returned good state" );
+ }
+
+ whid = rmr_wh_open( ctx, "localhost:9219" ); // ensure one is open
+ resp = rmr_wh_call( ctx, whid, mbuf, 1, 1 );
+ errors += fail_if_nil( resp, "wormhole call given valid info returned nil response" );
+
+