@@ -83,7 +83,7 @@ class e1_link : public srs_cu_cp::cu_cp_e1_handler
8383 // Note: May be called from io broker thread.
8484 cu_cp_tx_pdu_notifier = std::move (e1ap_tx_pdu_notifier);
8585 std::promise<void > eof_signal;
86- cu_gw_assoc_close_signaled = eof_signal.get_future ();
86+ cu_cp_gw_assoc_close_signaled = eof_signal.get_future ();
8787
8888 logger.info (" CU-CP handled new DU connection" );
8989 connection_complete_signal.set_value ();
@@ -97,21 +97,21 @@ class e1_link : public srs_cu_cp::cu_cp_e1_handler
9797 srslog::basic_logger& logger = srslog::fetch_basic_logger(" TEST" );
9898
9999 blocking_queue<e1ap_message> cu_rx_pdus{128 };
100- blocking_queue<e1ap_message> du_rx_pdus {128 };
100+ blocking_queue<e1ap_message> cu_up_rx_pdus {128 };
101101
102- std::future<void > cu_gw_assoc_close_signaled ;
103- std::future<void > du_gw_assoc_close_signaled ;
102+ std::future<void > cu_cp_gw_assoc_close_signaled ;
103+ std::future<void > cu_up_gw_assoc_close_signaled ;
104104 std::unique_ptr<e1ap_message_notifier> cu_cp_tx_pdu_notifier;
105- std::unique_ptr<e1ap_message_notifier> du_tx_pdu_notifier ;
105+ std::unique_ptr<e1ap_message_notifier> cu_up_tx_pdu_notifier ;
106106
107107protected:
108108 void connect_client ()
109109 {
110110 // Connect client to server.
111111 std::promise<void > eof_signal;
112- du_gw_assoc_close_signaled = eof_signal.get_future ();
113- du_tx_pdu_notifier = connector->handle_cu_up_connection_request (
114- std::make_unique<rx_pdu_notifier>(" CU-UP" , du_rx_pdus , std::move (eof_signal)));
112+ cu_up_gw_assoc_close_signaled = eof_signal.get_future ();
113+ cu_up_tx_pdu_notifier = connector->handle_cu_up_connection_request (
114+ std::make_unique<rx_pdu_notifier>(" CU-UP" , cu_up_rx_pdus , std::move (eof_signal)));
115115
116116 // Wait for server to receive connection.
117117 std::future<void > connection_completed = connection_complete_signal.get_future ();
@@ -143,7 +143,7 @@ class e1_gateway_link_test : public ::testing::TestWithParam<bool>
143143
144144 void send_to_cu_up (const e1ap_message& msg) { link->cu_cp_tx_pdu_notifier ->on_new_message (msg); }
145145
146- void send_to_cu_cp (const e1ap_message& msg) { link->du_tx_pdu_notifier ->on_new_message (msg); }
146+ void send_to_cu_cp (const e1ap_message& msg) { link->cu_up_tx_pdu_notifier ->on_new_message (msg); }
147147
148148 bool pop_cu_rx_pdu (e1ap_message& msg)
149149 {
@@ -152,10 +152,10 @@ class e1_gateway_link_test : public ::testing::TestWithParam<bool>
152152 return res;
153153 }
154154
155- bool pop_du_rx_pdu (e1ap_message& msg)
155+ bool pop_cu_up_rx_pdu (e1ap_message& msg)
156156 {
157157 bool res;
158- msg = link->du_rx_pdus .pop_blocking (&res);
158+ msg = link->cu_up_rx_pdus .pop_blocking (&res);
159159 return res;
160160 }
161161
@@ -190,7 +190,7 @@ static bool is_equal(const e1ap_message& lhs, const e1ap_message& rhs)
190190 return lhs_pdu == rhs_pdu;
191191}
192192
193- TEST_P (e1_gateway_link_test, when_du_sends_msg_then_cu_receives_msg )
193+ TEST_P (e1_gateway_link_test, when_cu_up_sends_msg_then_cu_receives_msg )
194194{
195195 create_link ();
196196
@@ -202,15 +202,15 @@ TEST_P(e1_gateway_link_test, when_du_sends_msg_then_cu_receives_msg)
202202 ASSERT_TRUE (is_equal (orig_msg, dest_msg));
203203}
204204
205- TEST_P (e1_gateway_link_test, when_cu_sends_msg_then_du_receives_msg )
205+ TEST_P (e1_gateway_link_test, when_cu_cp_sends_msg_then_cu_up_receives_msg )
206206{
207207 create_link ();
208208
209209 e1ap_message orig_msg = create_test_message ();
210210 send_to_cu_up (orig_msg);
211211
212212 e1ap_message dest_msg;
213- ASSERT_TRUE (pop_du_rx_pdu (dest_msg));
213+ ASSERT_TRUE (pop_cu_up_rx_pdu (dest_msg));
214214 ASSERT_TRUE (is_equal (orig_msg, dest_msg));
215215}
216216
@@ -221,7 +221,7 @@ TEST_P(e1_gateway_link_test, when_pcap_writer_disabled_then_no_pcap_is_written)
221221 e1ap_message orig_msg = create_test_message ();
222222 send_to_cu_up (orig_msg);
223223 e1ap_message dest_msg;
224- ASSERT_TRUE (pop_du_rx_pdu (dest_msg));
224+ ASSERT_TRUE (pop_cu_up_rx_pdu (dest_msg));
225225 byte_buffer sdu;
226226 ASSERT_FALSE (link->pcap .last_sdus .try_pop (sdu));
227227
@@ -238,7 +238,7 @@ TEST_P(e1_gateway_link_test, when_pcap_writer_enabled_then_pcap_is_written)
238238
239239 send_to_cu_up (orig_msg);
240240 e1ap_message dest_msg;
241- ASSERT_TRUE (pop_du_rx_pdu (dest_msg));
241+ ASSERT_TRUE (pop_cu_up_rx_pdu (dest_msg));
242242 bool popped = false ;
243243 byte_buffer sdu = link->pcap .last_sdus .pop_blocking (&popped);
244244 ASSERT_TRUE (popped);
@@ -260,8 +260,8 @@ TEST_P(e1_gateway_link_test, when_cu_tx_pdu_notifier_is_closed_then_connection_c
260260 logger.info (" Closing CU-CP Tx path..." );
261261 link->cu_cp_tx_pdu_notifier .reset ();
262262
263- // Wait for GW to report to DU that the association is closed.
264- link->du_gw_assoc_close_signaled .wait ();
263+ // Wait for GW to report to CU-UP that the association is closed.
264+ link->cu_up_gw_assoc_close_signaled .wait ();
265265}
266266
267267TEST_P (e1_gateway_link_test, when_cu_up_tx_pdu_notifier_is_closed_then_connection_closes)
@@ -270,10 +270,10 @@ TEST_P(e1_gateway_link_test, when_cu_up_tx_pdu_notifier_is_closed_then_connectio
270270
271271 // The CU-UP resets its E1 Tx notifier.
272272 logger.info (" Closing CU-UP Tx path..." );
273- link->du_tx_pdu_notifier .reset ();
273+ link->cu_up_tx_pdu_notifier .reset ();
274274
275275 // Wait for GW to report to CU that the association is closed.
276- link->cu_gw_assoc_close_signaled .wait ();
276+ link->cu_cp_gw_assoc_close_signaled .wait ();
277277}
278278
279279INSTANTIATE_TEST_SUITE_P (e1_gateway_link_tests, e1_gateway_link_test, ::testing::Values(true , false ));
0 commit comments