Try removing race condition in tests ^Cnding input before output received.