Make sure that backend testing is done with a timeout. 

I hope this will solve #3738 and #3444 which I think are duplicates.