Fix test running output truncation on async STDIO