backport #2186 to have unit tests green on release branch