You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by mc...@apache.org on 2012/11/13 21:52:20 UTC

svn commit: r1408954 - /qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb

Author: mcpierce
Date: Tue Nov 13 20:52:20 2012
New Revision: 1408954

URL: http://svn.apache.org/viewvc?rev=1408954&view=rev
Log:
NO JIRA: Fixed the rspec test for message priority.

It has a boundary case where rand(256) returns 0 and the test fails
since 0 is an allowed priority.

Modified:
    qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb

Modified: qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb?rev=1408954&r1=1408953&r2=1408954&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb (original)
+++ qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb Tue Nov 13 20:52:20 2012
@@ -97,7 +97,7 @@ module Qpid
 
       it "rejects a negative priority" do
         expect {
-          @message.priority = (0 - (rand(256)))
+          @message.priority = (0 - (rand(255) + 1))
         }.to raise_error(RangeError)
       end
 



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