Skip to content

Commit c70832d

Browse files
frankistcodebot
authored andcommitted
cu-cp: fix unit test comments
1 parent da63b6d commit c70832d

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

tests/unittests/cu_cp/cu_cp_connectivity_test.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ TEST_F(cu_cp_connectivity_test, when_e1_is_not_setup_then_new_ues_are_rejected)
333333
rnti_t crnti = to_rnti(0x4601);
334334
get_du(du_idx).push_tx_pdu(generate_init_ul_rrc_message_transfer(ue_f1ap_id, crnti));
335335

336-
// Verify F1AP DL RRC Message is sent with RRC Setup.
336+
// TEST: F1AP UE Context Command is sent to DU.
337337
f1ap_message f1ap_pdu;
338338
ASSERT_TRUE(this->wait_for_f1ap_tx_pdu(du_idx, f1ap_pdu, std::chrono::milliseconds{1000}));
339339
ASSERT_EQ(f1ap_pdu.pdu.type().value, asn1::f1ap::f1ap_pdu_c::types_opts::init_msg);
@@ -343,24 +343,26 @@ TEST_F(cu_cp_connectivity_test, when_e1_is_not_setup_then_new_ues_are_rejected)
343343
ASSERT_EQ(int_to_gnb_du_ue_f1ap_id(ue_rel->gnb_du_ue_f1ap_id), ue_f1ap_id);
344344
ASSERT_TRUE(ue_rel->srb_id_present);
345345
ASSERT_EQ(int_to_srb_id(ue_rel->srb_id), srb_id_t::srb0);
346+
347+
// TEST: RRC Reject is sent to UE.
346348
asn1::rrc_nr::dl_ccch_msg_s ccch;
347349
{
348350
asn1::cbit_ref bref{ue_rel->rrc_container};
349351
ASSERT_EQ(ccch.unpack(bref), asn1::SRSASN_SUCCESS);
350352
}
351353
ASSERT_EQ(ccch.msg.c1().type().value, asn1::rrc_nr::dl_ccch_msg_type_c::c1_c_::types_opts::rrc_reject);
352354

353-
// Check UE is created and is only destroyed when F1AP UE context release complete is received.
355+
// TEST: UE is not destroyed in CU-CP until UE Context Release Complete is received.
354356
auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report();
355357
ASSERT_EQ(report.ues.size(), 1);
356358
ASSERT_EQ(report.ues[0].rnti, crnti);
357359

358-
// Send F1AP UE Context Release Complete.
360+
// DU sends F1AP UE Context Release Complete.
359361
auto rel_complete =
360362
generate_ue_context_release_complete(int_to_gnb_cu_ue_f1ap_id(ue_rel->gnb_cu_ue_f1ap_id), ue_f1ap_id);
361363
get_du(du_idx).push_tx_pdu(rel_complete);
362364

363-
// Verify UE is removed.
365+
// TEST: Verify UE is removed in CU-CP.
364366
report = this->get_cu_cp().get_metrics_handler().request_metrics_report();
365367
ASSERT_TRUE(report.ues.empty());
366368

@@ -386,14 +388,14 @@ TEST_F(cu_cp_connectivity_test, when_initial_ul_rrc_message_has_no_rrc_container
386388
unsigned cu_up_idx = ret.value();
387389
ASSERT_TRUE(this->run_f1_setup(cu_up_idx));
388390

389-
// Send Initial UL RRC Message without DU-to-CU-RRC container.
391+
// Event: DU sends Initial UL RRC Message without DU-to-CU-RRC container.
390392
gnb_du_ue_f1ap_id_t du_ue_f1ap_id = int_to_gnb_du_ue_f1ap_id(0);
391393
rnti_t crnti = to_rnti(0x4601);
392394
f1ap_message init_rrc_msg = generate_init_ul_rrc_message_transfer(du_ue_f1ap_id, crnti);
393395
init_rrc_msg.pdu.init_msg().value.init_ul_rrc_msg_transfer()->du_to_cu_rrc_container_present = false;
394396
get_du(du_idx).push_tx_pdu(init_rrc_msg);
395397

396-
// Verify CU-CP sends a UE Context Release command over SRB0.
398+
// TEST: CU-CP sends a UE Context Release command over SRB0.
397399
f1ap_message f1ap_pdu;
398400
ASSERT_TRUE(this->wait_for_f1ap_tx_pdu(du_idx, f1ap_pdu));
399401
ASSERT_EQ(f1ap_pdu.pdu.type(), asn1::f1ap::f1ap_pdu_c::types_opts::options::init_msg);
@@ -405,25 +407,25 @@ TEST_F(cu_cp_connectivity_test, when_initial_ul_rrc_message_has_no_rrc_container
405407
ASSERT_TRUE(ue_rel->srb_id_present);
406408
ASSERT_EQ(ue_rel->srb_id, 0);
407409

408-
// Verify that the UE Context Release command contains an RRC Reject.
410+
// TEST: UE Context Release command contains an RRC Reject.
409411
asn1::rrc_nr::dl_ccch_msg_s ccch;
410412
{
411413
asn1::cbit_ref bref{f1ap_pdu.pdu.init_msg().value.ue_context_release_cmd()->rrc_container};
412414
ASSERT_EQ(ccch.unpack(bref), asn1::SRSASN_SUCCESS);
413415
}
414416
ASSERT_EQ(ccch.msg.c1().type().value, asn1::rrc_nr::dl_ccch_msg_type_c::c1_c_::types_opts::rrc_reject);
415417

416-
// Verify UE is not removed until UE Context Release Complete.
418+
// TEST: UE is not destroyed in CU-CP until UE Context Release Complete is received.
417419
auto report = this->get_cu_cp().get_metrics_handler().request_metrics_report();
418420
ASSERT_EQ(report.ues.size(), 1);
419421
ASSERT_EQ(report.ues[0].rnti, to_rnti(0x4601));
420422

421-
// Send F1AP UE Context Release Complete.
423+
// EVENT: DU sends F1AP UE Context Release Complete.
422424
auto rel_complete =
423425
generate_ue_context_release_complete(int_to_gnb_cu_ue_f1ap_id(ue_rel->gnb_cu_ue_f1ap_id), du_ue_f1ap_id);
424426
get_du(du_idx).push_tx_pdu(rel_complete);
425427

426-
// Verify UE is removed.
428+
// TEST: UE context removed from CU-CP.
427429
report = this->get_cu_cp().get_metrics_handler().request_metrics_report();
428430
ASSERT_TRUE(report.ues.empty());
429431
}

0 commit comments

Comments
 (0)