cloudamqp / amqp-client.rb

Modern AMQP 0-9-1 Ruby client
https://cloudamqp.github.io/amqp-client.rb/
MIT License
19 stars 6 forks source link

Run RabbitMQ in CI #1

Closed dentarg closed 3 years ago

dentarg commented 3 years ago

Use ENV to control the port used, did the minimum to get the tests running, thinking we can support reading more parts of the URI from ENV later.

There was a bug in the statement that assigned the port instance variable, || has higher precedence than the ternary operator so Ruby interpreted the old code as

(@uri.port || @tls) ? 5671 : 5672

which worked as expected as long as both variables where nil.