Skip to content

Commit 2373020

Browse files
Fix timing issue in test_CmisManagerTask_task_worker_decommission (#650)
1 parent d555def commit 2373020

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sonic-xcvrd/tests/test_xcvrd.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3426,9 +3426,7 @@ def test_CmisManagerTask_task_worker_decommission(self, mock_chassis, mock_get_s
34263426
# Force config status check to failed
34273427
mock_xcvr_api.get_config_datapath_hostlane_status.return_value = gen_cmis_config_status_dict('ConfigRejected')
34283428
mock_xcvr_api.get_datapath_state = MagicMock(return_value=gen_cmis_dp_state_dict('DataPathDeactivated'))
3429-
mock_xcvr_api.get_datapath_init_duration = MagicMock(return_value=0)
3430-
mock_xcvr_api.get_module_pwr_up_duration = MagicMock(return_value=0)
3431-
mock_xcvr_api.get_datapath_deinit_duration = MagicMock(return_value=0)
3429+
task.is_timer_expired = MagicMock(return_value=True)
34323430

34333431
# Insert 1st subport event
34343432
port_change_event = PortChangeEvent('Ethernet0', physical_port_idx, 0, PortChangeEvent.PORT_SET, {'speed':'100000', 'lanes':'1,2', 'subport': '1'})

0 commit comments

Comments
 (0)