mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove fiber HTTP test.
The HTTP test hits a remote website which isn't always available and is not self-contained. Ideally we will rewrite this test with an internal web server.
This commit is contained in:
parent
9f4b7fc82e
commit
238464863a
Notes:
git
2020-07-16 10:44:32 +09:00
1 changed files with 0 additions and 28 deletions
|
@ -1,28 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'net/http'
|
||||
require 'uri'
|
||||
require 'openssl'
|
||||
|
||||
require 'test/unit'
|
||||
require_relative 'scheduler'
|
||||
|
||||
class TestFiberHTTP < Test::Unit::TestCase
|
||||
def test_get
|
||||
Thread.new do
|
||||
scheduler = Scheduler.new
|
||||
Thread.current.scheduler = scheduler
|
||||
|
||||
Fiber do
|
||||
uri = URI("https://www.ruby-lang.org/en/")
|
||||
|
||||
http = Net::HTTP.new uri.host, uri.port
|
||||
http.use_ssl = true
|
||||
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||
body = http.get(uri.path).body
|
||||
|
||||
assert !body.empty?
|
||||
end
|
||||
end.join
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue