X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Frmr_nng_api_static_test.c;h=6588907ba8fb8e1bc166631de032b38e1bc107d7;hb=ab6d04ce30514b16ba5821fcc788157b4779a4a3;hp=f08c2f1639574907a7fb033ea4c6652be4e319f5;hpb=dfe7b622b128e7bfb4a5e1f7e0afdb84e6001d14;p=ric-plt%2Flib%2Frmr.git diff --git a/test/rmr_nng_api_static_test.c b/test/rmr_nng_api_static_test.c index f08c2f1..6588907 100644 --- a/test/rmr_nng_api_static_test.c +++ b/test/rmr_nng_api_static_test.c @@ -274,6 +274,8 @@ static int rmr_api_test( ) { snprintf( msg->xaction, 17, "%015d", 16 ); // dummy transaction id (emulation generates, this should arrive after a few calls to recv) msg->mtype = 0; msg->sub_id = -1; + em_set_rcvcount( 0 ); // reset message counter + em_set_rcvdelay( 1 ); // force slow msg rate during mt testing msg = rmr_call( rmc, msg ); // dummy nng/nano function will sequentually add xactions and should match or '16' errors += fail_if_nil( msg, "rmr_call returned a nil message on call expected to succeed " ); if( msg ) { @@ -444,15 +446,15 @@ static int rmr_api_test( ) { errors += fail_if_nil( msg, "mt_call with known xaction id returned nil message" ); } fprintf( stderr, " time check: %ld\n", time( NULL ) ); - em_set_mtc_msgs( 0 ); // turn off - em_set_rcvdelay( 0 ); // full speed receive rate - ((uta_ctx_t *)rmc)->shutdown = 1; // force the mt-reciver attached to the context to stop + em_set_rcvdelay( 0 ); // full speed receive rate to overflow the ring - em_set_rcvdelay( 0 ); // let the receive loop spin w/o receives so we drive warning code about queue full - sleep( 5 ); + fprintf( stderr, " pausing 5s to allow mt-call receive ring to fill %ld\n", time( NULL ) ); + sleep( 2 ); + fprintf( stderr, " tests continuing %ld\n", time( NULL ) ); em_set_rcvdelay( 1 ); // restore slow receive pace for any later tests + ((uta_ctx_t *)rmc)->shutdown = 1; // force the mt-reciver attached to the context to stop #endif