merging #2817 connection.js test failing when stderr/stdout going to a non-tty