[Test] Backport tests enhancement from master to 1.3 and 1.2 branches

Hopefully, it will will our CI to be more robust in those branches.