[tests] fix tests hanging

Also, changed exceptions to safe
parent 7056810c
Pipeline #6621 failed with stages
in 14 minutes and 32 seconds