Sha256: 19b573a074f66290e0dfb5fe35d6a1b026a6fff09b728e4b86974637726b355f

Contents?: true

Size: 1.24 KB

Versions: 13

Compression:

Stored size: 1.24 KB

Contents

Feature: Error Handling

  @bunny
  Scenario: Queue isn't found on the broker
    Given I am connected to the broker
    When I execute the following code
    """ruby
    MessageDriver::Client.dynamic_destination("missing_queue", passive: true)
    """

    Then I expect it to raise a MessageDriver::QueueNotFound error

  @no_ci
  @bunny
  @slow
  Scenario: The broker goes down
    Given the following broker configuration
    """ruby
    MessageDriver::Broker.define do |b|
      b.destination :my_queue, "broker_down_queue", durable: true, arguments: {:'x-expires' => 1000*60*10 } #expires in 10 minutes
    end
    """
    And I have no messages on :my_queue

    When I execute the following code
    """ruby
    publish(:my_queue, "Test Message 1")
    """
    And the broker goes down
    And I execute the following code
    """ruby
    publish(:my_queue, "Test Message 2")
    """
    Then I expect it to raise a MessageDriver::ConnectionError error

    When the broker comes up
    And I execute the following code
    """ruby
    publish(:my_queue, "Test Message 3")
    """

    Then I expect to have no errors
    And I expect to find the following 2 messages on :my_queue
      | body           |
      | Test Message 1 |
      | Test Message 3 |

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
message-driver-1.0.1 features/error_handling.feature
message-driver-1.0.0 features/error_handling.feature
message-driver-0.7.2 features/error_handling.feature
message-driver-0.7.1 features/error_handling.feature
message-driver-0.7.0 features/error_handling.feature
message-driver-0.6.1 features/error_handling.feature
message-driver-0.6.0 features/error_handling.feature
message-driver-0.5.3 features/error_handling.feature
message-driver-0.5.2 features/error_handling.feature
message-driver-0.5.1 features/error_handling.feature
message-driver-0.5.0 features/error_handling.feature
message-driver-0.4.0 features/error_handling.feature
message-driver-0.3.0 features/error_handling.feature