File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,16 @@ def <<(msg)
160160
assert_join_threads([client_thread, server_thread])
161161
}
162162
end
163+
164+
def test_shutdown_pipe
165+
pipe = IO.pipe
166+
server = WEBrick::GenericServer.new(
167+
:ShutdownPipe => pipe,
168+
:BindAddress => '0.0.0.0',
169+
:Port => 0,
170+
:Logger => WEBrick::Log.new([], WEBrick::BasicLog::WARN))
171+
server_thread = Thread.start { server.start }
172+
pipe.last.puts('')
173+
assert_join_threads([server_thread])
174+
end
163175
end

0 commit comments

Comments
 (0)