[Bug #20682] Add sleep 0.1 to stabilize flaky failures on macOS (#12829)

[Bug #20682] Add `sleep 0.1` to stabilize flaky failures on macOS
This commit is contained in:
Naoto Ono 2025-02-28 18:32:36 +09:00 committed by GitHub
parent 1ead1eb6db
commit db4ea95219
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
Notes: git 2025-02-28 09:32:54 +00:00
Merged-By: ono-max <onoto1998@gmail.com>

View File

@ -444,7 +444,9 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do
def test_ttyname
return unless IO.method_defined?(:ttyname)
assert_equal(["true"], run_pty("p STDIN.ttyname == STDOUT.ttyname"))
# [Bug #20682]
# `sleep 0.1` is added to stabilize flaky failures on macOS.
assert_equal(["true"], run_pty("p STDIN.ttyname == STDOUT.ttyname; sleep 0.1"))
end
end