Fix TestEventsImageImport racy Upstream-commit: b31d154294ed7a621de1b620f051cf9547c09385 Component: engine