From 58d5208bfc365d7110adec344d774204bdb1ccab Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 26 Sep 2018 16:55:46 +0200 Subject: [PATCH] fix RLC AM test --- lib/test/upper/rlc_am_test.cc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/test/upper/rlc_am_test.cc b/lib/test/upper/rlc_am_test.cc index 38d2e4641..0913dd264 100644 --- a/lib/test/upper/rlc_am_test.cc +++ b/lib/test/upper/rlc_am_test.cc @@ -1254,8 +1254,6 @@ bool resegment_test_7() rlc_am rlc1; rlc_am rlc2; - int len; - log1.set_level(srslte::LOG_LEVEL_DEBUG); log2.set_level(srslte::LOG_LEVEL_DEBUG); @@ -1300,7 +1298,14 @@ bool resegment_test_7() assert(pdu_bufs[i].N_bytes); } - assert(0 == rlc1.get_buffer_state()); + // Step timers until poll_retx timeout expires + int cnt = 5; + while (cnt--) { + timers.step_all(); + } + + // RLC should try to retx a random PDU because it needs to request a status from the receiver + assert(0 != rlc1.get_buffer_state()); // Skip PDU with SN 2 for(uint32_t i=0;i