Skip to content

Commit

Permalink
Adjust the test suite for rack 3
Browse files Browse the repository at this point in the history
The project dependencies now allow rack 3 to be installed.  This
backwards incompatible version extracted handlers in a new rackup gem.
While we could indicate we prefer to use rack 2 which is still receiving
update, it is more future-proof to update our code to be compatible with
the latest version of the dependency.

This is a development dependency only so will not affect users of the
project.
  • Loading branch information
smortex committed Jan 21, 2024
1 parent 68f7712 commit 7d4d5f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions riemann-tools.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'github_changelog_generator'
spec.add_development_dependency 'racc'
spec.add_development_dependency 'rackup'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'rubocop'
Expand Down
4 changes: 2 additions & 2 deletions spec/riemann/tools/http_check_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require 'openssl'
require 'rack/handler/webrick'
require 'rackup/handler/webrick'
require 'sinatra/base'
require 'webrick'
require 'webrick/https'
Expand Down Expand Up @@ -100,7 +100,7 @@ def protected!
Logger: WEBrick::Log.new(File.open(File::NULL, 'w')),
}
@server = WEBrick::HTTPServer.new(server_options)
@server.mount('/', Rack::Handler::WEBrick, TestWebserver)
@server.mount('/', Rackup::Handler::WEBrick, TestWebserver)
@started = false
Thread.new { @server.start }
Timeout.timeout(1) { sleep(0.1) until @started }
Expand Down

0 comments on commit 7d4d5f3

Please sign in to comment.