qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject svn commit: r1342786 - in /qpid/trunk/qpid/cpp/bindings/qpid/ruby/features: creating_a_receiver.feature creating_a_sender.feature receiving_a_message.feature sending_a_message.feature step_definitions/address_steps.rb step_definitions/receiver_steps.rb
Date Fri, 25 May 2012 19:24:21 GMT
Author: tross
Date: Fri May 25 19:24:21 2012
New Revision: 1342786

URL: http://svn.apache.org/viewvc?rev=1342786&view=rev
Log:
QPID-3995 - Cleans up queues created during Cucumber feature tests 
Applied patch from Darryl Pierce

Modified:
    qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature
    qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/creating_a_sender.feature
    qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/receiving_a_message.feature
    qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/sending_a_message.feature
    qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb
    qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb

Modified: qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature?rev=1342786&r1=1342785&r2=1342786&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature Fri May 25
19:24:21 2012
@@ -21,9 +21,9 @@ Feature: Creating a receiver
 
   Scenario: The address string is fine
     Given an open session
-    Then creating a receiver with "my-queue;{create:always}" succeeds
+    Then creating a receiver with "my-queue;{create:always,delete:always}" succeeds
 
   Scenario: Using an Address object
     Given an open session
-    And an Address with the name "create-receiver-test" and subject "foo" and option "create"
set to "always"
+    And an Address with the name "create-receiver-test" and subject "foo" and option "create"
set to "always" and "delete" set to "always"
     Then creating a receiver with an Address succeeds

Modified: qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/creating_a_sender.feature
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/creating_a_sender.feature?rev=1342786&r1=1342785&r2=1342786&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/creating_a_sender.feature (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/creating_a_sender.feature Fri May 25 19:24:21
2012
@@ -5,11 +5,11 @@ Feature: Creating a sender
 
   Scenario: The session is closed
     Given a closed session
-    Then creating a sender with "my-queue;{create:always}" raises an exception
+    Then creating a sender with "my-queue;{create:always,delete:always}" raises an exception
 
   Scenario: The connection is closed
     Given an open session with a closed connection
-    Then creating a sender with "my-queue;{create:always}" raises an exception
+    Then creating a sender with "my-queue;{create:always,delete:always}" raises an exception
 
   Scenario: The address is malformed
     Given an open session
@@ -17,7 +17,7 @@ Feature: Creating a sender
 
   Scenario: The address string is valid
     Given an open session
-    Then creating a sender with "my-queue;{create:always}" succeeds
+    Then creating a sender with "my-queue;{create:always,delete:always}" succeeds
 
   Scenario: Using an Address object
     Given an open session

Modified: qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/receiving_a_message.feature
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/receiving_a_message.feature?rev=1342786&r1=1342785&r2=1342786&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/receiving_a_message.feature (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/receiving_a_message.feature Fri May 25
19:24:21 2012
@@ -4,24 +4,26 @@ Feature: Receving a message
   I need to be able to receive messages
 
   Scenario: Receiving after the session is closed
-    Given a sender and receiver for "my-queue;{create:always}"
+    Given a sender and receiver for "my-queue;{create:always,delete:always}"
     And the message "this is a test" is sent
     And the session is closed
     Then getting the next message raises an error
 
   Scenario: Receiving after the connection is closed
-    Given a sender and receiver for "my-queue;{create:always}"
+    Given a sender and receiver for "my-queue;{create:always,delete:always}"
     And the message "this is a test" is sent
     And the connection is closed
     Then getting the next message raises an error
 
   Scenario: No message is received on an empty queue
-    Given an existing receiver for "my-queue;{create:always}"
+    Given an existing receiver for "my-queue;{create:always,delete:always}"
     And the receiver has no pending messages
     Then getting the next message raises an error
 
   Scenario: A message is pending
-    Given a sender and receiver for "my-queue;{create:always}"
+    Given an open session
+    And given a sender for "my-queue;{create:always}"
+    And given a receiver for "my-queue;{create:always,delete:always}"
     And the receiver has a capacity of 1
     And the message "this is a test" is sent
     Then the receiver should have 1 message available

Modified: qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/sending_a_message.feature
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/sending_a_message.feature?rev=1342786&r1=1342785&r2=1342786&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/sending_a_message.feature (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/sending_a_message.feature Fri May 25 19:24:21
2012
@@ -5,17 +5,17 @@ Feature: Sending a message
 
   Scenario: The session is closed
     Given an open session
-    And creating a sender with "my-queue;{create:always}" succeeds
+    And creating a sender with "my-queue;{create:always,delete:always}" succeeds
     And the session is closed
     Then sending the message "This is a test" should raise an error
 
   Scenario: The connection is closed
     Given an open session
-    And creating a sender with "my-queue;{create:always}" succeeds
+    And creating a sender with "my-queue;{create:always,delete:always}" succeeds
     And the connection is closed
     Then sending the message "This is a test" should raise an error
 
   Scenario: The message sends successfully
     Given an open session
-    And creating a sender with "my-queue;{create:always}" succeeds
+    And creating a sender with "my-queue;{create:always,delete:always}" succeeds
     Then sending the message "This is a test" succeeds
\ No newline at end of file

Modified: qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb?rev=1342786&r1=1342785&r2=1342786&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb Fri
May 25 19:24:21 2012
@@ -22,3 +22,10 @@ Given /^an Address with the name "([^"]*
   options["#{key}"] = "#{value}"
   @address = Qpid::Messaging::Address.new "#{name}", "#{subject}", options
 end
+
+Given /^an Address with the name "([^"]*)" and subject "([^"]*)" and option "([^"]*)" set
to "([^"]*)" and "([^"]*)" set to "([^"]*)"$/ do |name, subject, key1, value1, key2, value2|
+  options = Hash.new
+  options["#{key1}"] = "#{value1}"
+  options["#{key2}"] = "#{value2}"
+  @address = Qpid::Messaging::Address.new "#{name}", "#{subject}", options
+end

Modified: qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb?rev=1342786&r1=1342785&r2=1342786&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb (original)
+++ qpid/trunk/qpid/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb Fri
May 25 19:24:21 2012
@@ -59,3 +59,11 @@ Then /^the receiver should have (\d+) me
   sleep 1
   @receiver.available.should == available.to_i
 end
+
+Given /^given a sender for "([^"]*)"$/ do |address|
+  @sender = @session.create_sender "#{address}"
+end
+
+Given /^given a receiver for "([^"]*)"$/ do |address|
+  @receiver = @session.create_receiver "#{address}"
+end



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message