Merge "Fix flaky test and add failure message" into main