Skip to content

Commit

Permalink
Add optional after(error) argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jul 28, 2024
1 parent 4afdeb9 commit 3a77763
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sus/fixtures/async/http/server_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def before
@client = make_client(@client_endpoint)
end

def after
def after(error = nil)
# We add a timeout here, to avoid hanging in `@client.close`:
::Async::Task.current.with_timeout(1) do
@client&.close
Expand Down
2 changes: 1 addition & 1 deletion sus-fixtures-async-http.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = ">= 3.1"

spec.add_dependency "async-http", "~> 0.54"
spec.add_dependency "sus", "~> 0.10"
spec.add_dependency "sus", "~> 0.31"
spec.add_dependency "sus-fixtures-async", "~> 0.1"
end

0 comments on commit 3a77763

Please sign in to comment.