chore: fix flaky steps_output_within - part 2 (#14562)

This commit is contained in:
David Sherret 2022-05-10 16:24:37 -04:00 committed by GitHub
parent 11c13fb981
commit abf72c5b37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View file

@ -1623,9 +1623,9 @@ impl TestOutputPipe {
// that it's done clearing out its pipe before returning.
let (sender, receiver) = std::sync::mpsc::channel();
self.state.lock().replace(sender);
// Bit of a hack in order to send a zero width space in order
// to wake the thread up. It seems that sending zero bytes
// does not work here on windows.
// Bit of a hack to send a zero width space in order to wake
// the thread up. It seems that sending zero bytes here does
// not work on windows.
self.writer.write_all(ZERO_WIDTH_SPACE.as_bytes()).unwrap();
self.writer.flush().unwrap();
receiver.recv().unwrap();