X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fapp_test%2Freceiver.c;h=e5f6d41e335fddd1dfd42cae93d03b3b154aeac4;hb=refs%2Fchanges%2F34%2F11234%2F5;hp=3cf1498035f3d0873b1016e2ca2f3aa4efc9725c;hpb=2596b2305f214efbd7aba832fa009217ab854770;p=ric-plt%2Flib%2Frmr.git diff --git a/test/app_test/receiver.c b/test/app_test/receiver.c index 3cf1498..e5f6d41 100644 --- a/test/app_test/receiver.c +++ b/test/app_test/receiver.c @@ -198,6 +198,9 @@ int main( int argc, char** argv ) { while( rt_count > 0 && msg != NULL && msg->state == RMR_ERR_RETRY ) { // to work right in nano we need this :( if( ack_count < 1 ) { // 1st ack, so we need to connect, and we'll wait for that sleep( 1 ); + if( rt_count > 5 ) { + rt_count = 5; // but only for 5sec; not 1000sec! + } } rt_count--; msg = rmr_rts_msg( mrc, msg ); // we don't try to resend if this returns retry @@ -206,6 +209,8 @@ int main( int argc, char** argv ) { ack_count++; } } + + timeout = time( NULL ) + 10; // extend timeout to 10s past last received message } } @@ -223,7 +228,7 @@ int main( int argc, char** argv ) { } fprintf( stderr, " mtype histogram: %s\n", wbuf ); - fprintf( stderr, " [%s] %ld messages; good=%ld acked=%ld bad=%ld bad-trace=%ld bad-sub_id=%ld\n", + fprintf( stderr, " [%s] %ld messages; good=%ld acked=%ld bad=%ld bad-trace=%ld bad-sub_id=%ld\n", !!(errors + bad + bad_tr) ? "FAIL" : "PASS", count, good, ack_count, bad, bad_tr, bad_sid ); sleep( 2 ); // let any outbound acks flow before closing