You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests that compare thread lists fail when they are the first to use Timeout #739
Five tests compare Thread.list before and after a step. Timeout.timeout starts one thread for the process on first use and keeps it, and StreamableHTTPTransport calls it for every bounded stream write. When one of the five is the first test in the process to reach that call, it counts the Timeout thread as one the transport started, and fails. Whether that happens depends on the seed only.
In test/mcp/server/transports/streamable_http_transport_test.rb:
listen keepalive ends with its slot on transport close
listen keepalive ends with its slot when a delivery write fails
listen keepalive is not started when the interval is nil
In test/mcp/server/transports/streamable_http_stream_request_notifications_test.rb:
a response the client does not read ends the request after stream_write_timeout
a response the client stops reading part way is cut there, and nothing is written after it
It failed the Ruby 3.1 job of #736 (seed 50208) and the Ruby 3.4 job of #738 (seed 25473). The latter also cancelled the jobs still running.
Expected [#<Thread:0x00000001254c59c0@Timeout stdlib thread .../gems/timeout-0.6.1/lib/timeout.rb:87 sleep_forever>] to be empty.
Ruby 4.0.9, timeout 0.6.1.
Additional context
I ran each of the 406 tests of the two files in a process of its own on main: these five fail, and none fails when the Timeout thread is started first.
I have a fix in test/test_helper.rb and will open a PR for it.
Activity