Ruby 3.0.1 + Rails 6.1.3 makes handler spec to fail
sharshenov opened this issue · 0 comments
sharshenov commented
Ruby 3.0.1 + Rails 6.1.3 makes spec/integration/handler_spec.rb:104
spec to fail with error
Error output
Failures:
1) Handler when job is failing when failure is not handled by ActiveJob retried job headers have error details
Failure/Error: client.get_messages(vhost, queue, ackmode: ackmode, count: count, encoding: encoding)
Faraday::ResourceNotFound:
the server responded with status 404
# /usr/local/bundle/gems/faraday-1.4.2/lib/faraday/response/raise_error.rb:22:in `on_complete'
# /usr/local/bundle/gems/faraday-1.4.2/lib/faraday/middleware.rb:19:in `block in call'
# /usr/local/bundle/gems/faraday-1.4.2/lib/faraday/response.rb:59:in `on_complete'
# /usr/local/bundle/gems/faraday-1.4.2/lib/faraday/middleware.rb:18:in `call'
# /usr/local/bundle/gems/faraday_middleware-1.0.0/lib/faraday_middleware/response/follow_redirects.rb:79:in `perform_with_redirection'
# /usr/local/bundle/gems/faraday_middleware-1.0.0/lib/faraday_middleware/response/follow_redirects.rb:67:in `call'
# /usr/local/bundle/gems/faraday-1.4.2/lib/faraday/rack_builder.rb:154:in `build_response'
# /usr/local/bundle/gems/faraday-1.4.2/lib/faraday/connection.rb:494:in `run_request'
# /usr/local/bundle/gems/faraday-1.4.2/lib/faraday/connection.rb:279:in `post'
# /usr/local/bundle/gems/rabbitmq_http_api_client-1.15.0/lib/rabbitmq/http/client.rb:185:in `get_messages'
# ./spec/support/rabbitmq_helpers.rb:32:in `messages'
# ./spec/support/rabbitmq_helpers.rb:58:in `rabbitmq_messages'
# ./spec/integration/handler_spec.rb:101:in `block (5 levels) in <top (required)>'
# ./spec/integration/handler_spec.rb:105:in `block (5 levels) in <top (required)>'
Finished in 1 minute 21.14 seconds (files took 0.91244 seconds to load)
73 examples, 1 failure
Failed examples:
rspec ./spec/integration/handler_spec.rb:104 # Handler when job is failing when failure is not handled by ActiveJob retried job headers have error details
Steps to reproduce:
- Create a
docker-compose.yml
with combination of Ruby3.0.1
andgemfiles/activejob_6.1.x.gemfile
gemfile - Run
docker-compose run rake
docker-compose.yml (docker-compose v1.27.0+)
services:
rake:
image: "ruby:3.0.1"
depends_on:
rabbitmq:
condition: service_healthy
links:
- rabbitmq
volumes:
- './:/app'
- '.bundle/:/usr/local/bundle/'
working_dir: /app
depends_on:
rabbitmq:
condition: service_healthy
environment:
- BUNDLE_GEMFILE=gemfiles/activejob_6.1.x.gemfile
- RABBITMQ_URL=amqp://guest:guest@rabbitmq/advanced_sneakers
command: bash -c "bundle install --jobs 4 --retry 3 && rake"
rabbitmq:
image: "rabbitmq:3.8-management-alpine"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "listeners"]
interval: 10s
timeout: 5s
retries: 5