Don't left connections open if fails on Node.js testing

Change-Id: I31385fc207b125280f35000b2afa8d1c4d328dbc