@@ -224,21 +224,20 @@ bool du_high_env_simulator::add_ue(rnti_t rnti, du_cell_index_t cell_index)
224224 bool init_ul_rrc_msg_flag = false ;
225225 auto init_ul_rrc_msg_sent = [this , rnti, &init_ul_rrc_msg_flag]() {
226226 if (init_ul_rrc_msg_flag) {
227- return true ;
227+ return ;
228228 }
229229 if (not cu_notifier.last_f1ap_msgs .empty ()) {
230230 report_fatal_error_if_not (
231231 test_helpers::is_init_ul_rrc_msg_transfer_valid (cu_notifier.last_f1ap_msgs .back (), rnti),
232232 " Init UL RRC Message is not valid" );
233233 init_ul_rrc_msg_flag = true ;
234- return true ;
234+ return ;
235235 }
236- return false ;
237236 };
238237 bool conres_sent = false ;
239238 auto con_res_ce_sent = [this , rnti, cell_index, &conres_sent]() {
240239 if (conres_sent) {
241- return true ;
240+ return ;
242241 }
243242 phy_cell_test_dummy& phy_cell = phy.cells [cell_index];
244243 if (phy_cell.last_dl_res .has_value ()) {
@@ -248,12 +247,15 @@ bool du_high_env_simulator::add_ue(rnti_t rnti, du_cell_index_t cell_index)
248247 nullptr ,
249248 " UE ConRes not scheduled" );
250249 conres_sent = true ;
251- return true ;
250+ return ;
252251 }
253252 }
254- return false ;
255253 };
256- if (not run_until ([&]() { return init_ul_rrc_msg_sent () and con_res_ce_sent (); })) {
254+ if (not run_until ([&]() {
255+ init_ul_rrc_msg_sent ();
256+ con_res_ce_sent ();
257+ return conres_sent and init_ul_rrc_msg_flag;
258+ })) {
257259 test_logger.error (" rnti={}: Unable to add UE. Timeout waiting for Init UL RRC Message or ConRes CE" , rnti);
258260 return false ;
259261 }
0 commit comments