Skip to content

Commit 29dd92e

Browse files
committed
add tests
Signed-off-by: Vaibhav Dahiya <vdahiya@microsoft.com>
1 parent 751f2e5 commit 29dd92e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

sonic-ycabled/tests/test_y_cable_helper.py

+10
Original file line numberDiff line numberDiff line change
@@ -7776,3 +7776,13 @@ def test_ycable_wait_for_state_change(self):
77767776
rc = wait_for_state_change(channel_conn, port)
77777777

77787778
assert (rc == None)
7779+
7780+
channel_conn = grpc.ChannelConnectivity.READY
7781+
rc = wait_for_state_change(channel_conn, port)
7782+
7783+
assert (rc == None)
7784+
7785+
channel_conn = grpc.ChannelConnectivity.SHUTDOWN
7786+
rc = wait_for_state_change(channel_conn, port)
7787+
7788+
assert (rc == None)

sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3558,7 +3558,7 @@ def handle_hw_mux_cable_table_grpc_notification(fvp, hw_mux_cable_tbl, asic_inde
35583558
('read_side', read_side),
35593559
('active_side', str(active_side))])
35603560
hw_mux_cable_tbl[asic_index].set(port, fvs_updated)
3561-
helper_logger.log_debug("Y_CABLE_DEBUG: processed the notification hw mux state cleanly {}".format(port))
3561+
helper_logger.log_debug("Y_CABLE_DEBUG: processed the notification hw mux state cleanly {} stubs {} channels {}".format(port, len(grpc_port_stubs), len(grpc_port_channels)))
35623562
else:
35633563
helper_logger.log_info("Got a change event on port {} of table {} that does not contain state".format(
35643564
port, swsscommon.APP_HW_MUX_CABLE_TABLE_NAME))

0 commit comments

Comments
 (0)