File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
openwisp_controller/connection/tests Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -1047,24 +1047,6 @@ def test_device_update_config_in_progress(
10471047 mocked_get_working_connection .assert_not_called ()
10481048 update_config .assert_not_called ()
10491049
1050- # Regression: when the only active task matches the current task's own ID,
1051- # _is_update_in_progress must return False (update should proceed).
1052- with mock .patch ("celery.app.control.Inspect.active" ) as mocked_active :
1053- current_task_id = "current-task-id"
1054- mocked_active .return_value = {
1055- "worker1" : [
1056- {
1057- "name" : _TASK_NAME ,
1058- "args" : [str (conf .device .pk )],
1059- "id" : current_task_id ,
1060- }
1061- ]
1062- }
1063- result = _is_update_in_progress (
1064- conf .device .pk , current_task_id = current_task_id
1065- )
1066- self .assertFalse (result )
1067-
10681050 def test_update_in_progress_ignores_current_task (self ):
10691051 """Regression test: _is_update_in_progress must not match the
10701052 currently running task, which would cause it to skip itself."""
You can’t perform that action at this time.
0 commit comments