Skip to content

Commit

Permalink
refactor the testCoreMaintruncation into statushandlertruncation
Browse files Browse the repository at this point in the history
  • Loading branch information
feng-j678 committed Nov 15, 2023
1 parent d942dfb commit afe6ac0
Show file tree
Hide file tree
Showing 3 changed files with 560 additions and 1,547 deletions.
3 changes: 2 additions & 1 deletion src/core/src/service_interfaces/StatusHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ def add_error_to_status(self, message, error_code=Constants.PatchOperationErrorC
current_operation = self.__current_operation if current_operation_override_for_error == Constants.DEFAULT_UNSPECIFIED_VALUE else current_operation_override_for_error

if current_operation == Constants.ASSESSMENT:
print('did this get called', current_operation)
if self.__try_add_error(self.__assessment_errors, error_detail):
self.__assessment_total_error_count += 1
# retain previously set status and code for assessment substatus
Expand Down Expand Up @@ -932,7 +933,7 @@ def __apply_truncation_process(self, assessment_packages, installation_packages,
max_package_list_capacity = max_package_list_capacity - self.__calc_package_payload_size_on_disk(min_assessment_patches_to_retain)

# Apply high priority (Failed, Installed) and low priority (Pending, Excluded, Not_Selected) installation logic, and keep min 5 assessment packages
if low_pri_index:
if low_pri_index is not None:
installation_high_pri = installation_packages[:low_pri_index]
installation_low_pri = installation_packages[low_pri_index:]

Expand Down
Loading

0 comments on commit afe6ac0

Please sign in to comment.