From 3614c1004ec7d774b75642a89a049cff5ffe2e8d Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Mon, 14 Oct 2019 19:42:34 +0100 Subject: [PATCH] Fixed issue in test with out-of-order packets. --- lib/test/upper/pdcp_nr_test.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/test/upper/pdcp_nr_test.cc b/lib/test/upper/pdcp_nr_test.cc index 610bd5677..98d0abfe1 100644 --- a/lib/test/upper/pdcp_nr_test.cc +++ b/lib/test/upper/pdcp_nr_test.cc @@ -128,20 +128,19 @@ int test_rx(std::vector events, pdcp_hlp_rx.set_pdcp_initial_state(init_state); - srslte::unique_byte_buffer_t sdu_act = allocate_unique_buffer(*pool); - // Generate test message and encript/decript SDU. for (pdcp_test_event_t& event : events) { // Decript and integrity check the PDU pdcp_rx->write_pdu(std::move(event.pkt)); - gw_rx->get_last_pdu(sdu_act); } // Test if the number of RX packets - TESTASSERT(compare_two_packets(sdu_exp, sdu_act) == 0); TESTASSERT(gw_rx->rx_count == n_sdus_exp); + srslte::unique_byte_buffer_t sdu_act = allocate_unique_buffer(*pool); + gw_rx->get_last_pdu(sdu_act); + TESTASSERT(compare_two_packets(sdu_exp, sdu_act) == 0); return 0; }