Skip to content

Commit 065c73f

Browse files
FabianEckermanncodebot
authored andcommitted
cu_cp: improve paging unit test
1 parent 8749a6b commit 065c73f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/unittests/cu_cp/cu_cp_paging_test.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,22 @@ TEST_F(cu_cp_paging_test, when_valid_paging_message_received_then_paging_is_only
276276
unsigned du_idx2 = setup_du(test_helpers::generate_f1_setup_request(
277277
int_to_gnb_du_id(0x12), {{nr_cell_identity::create(6577).value(), 1, 7}}));
278278

279+
// Connect third DU and run F1Setup.
280+
unsigned du_idx3 = setup_du(test_helpers::generate_f1_setup_request(
281+
int_to_gnb_du_id(0x13), {{nr_cell_identity::create(6578).value(), 2, 7}}));
282+
283+
// Drop the second DU connection to test that paging is not sent to disconnected DUs.
284+
ASSERT_TRUE(drop_du_connection(du_idx2));
285+
279286
// Inject NGAP Paging with only mandatory values and await F1AP Paging.
280287
ASSERT_TRUE(send_minimal_ngap_paging_and_await_f1ap_paging(du_idx));
281288

282289
// Make sure he paging request is in the metrics.
283290
auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report();
284291
ASSERT_EQ(report.ngaps[0].metrics.nof_cn_initiated_paging_requests, 1) << "Paging request should be in the metrics";
285292

286-
// Make sure that no paging was sent to the second DU.
287-
ASSERT_FALSE(this->get_du(du_idx2).try_pop_dl_pdu(f1ap_pdu));
293+
// Make sure that no paging was sent to the third DU.
294+
ASSERT_FALSE(this->get_du(du_idx3).try_pop_dl_pdu(f1ap_pdu));
288295
}
289296

290297
TEST_F(cu_cp_paging_test, when_valid_paging_message_with_optional_values_received_then_paging_is_sent_to_du)

0 commit comments

Comments
 (0)