qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcpie...@apache.org
Subject svn commit: r1408954 - /qpid/proton/trunk/proton-c/bindings/ruby/spec/qpid/proton/message_spec.rb
Date Tue, 13 Nov 2012 20:52:20 GMT
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


Mime
View raw message