JIRA Instance Health does not display correct error level for category

Description

Summary

As health checks can be run asynchronously in the background inside a scheduler, the return order can vary, as can the severity level. If a warning is returned for a category, and then a critical error it will show the category as warning rather than critical.

Steps to Reproduce

Execute the healthchecks such that a warning and critical is returned for the same category, as per the screenshot.
This is easier to reproduce by preventing Atlassian Marketplace access so the End of Life check takes longer to run.

Expected Results

The category has the highest warning level - in this case that is critical.

Actual Results

The category uses the warning level that is returned first, as per the screenshot this is warning.

Environment

None

Assignee

Unassigned

Reporter

Dave C

Components

None

Add-on Type

None

Team

None

CC

None

Risk factor

None

Affected Product/s

None

Priority

Major
Configure