test/test_connection1p.rb in stomp-1.2.8 vs test/test_connection1p.rb in stomp-1.2.9
- old
+ new
@@ -337,11 +337,11 @@
conn.disconnect
end
hb_asserts_both(conn)
end if ENV['STOMP_HB11LONG']
- # Test very encoding / decoding of headers
+ # Test very basic encoding / decoding of headers
def test_conn_1p_0200
@conn.disconnect
#
cha = get_conn_headers()
conn = Stomp::Connection.open(user, passcode, host, port, false, 5, cha)
@@ -366,9 +366,27 @@
assert received.headers.has_value?(v), "Value not found: #{v}"
assert received.headers[k] == v, "Mismatch: #{k},#{v}"
}
conn.disconnect
end unless ENV['STOMP_RABBIT']
+
+ # Test that 1.1+ connections do not break suppress_content_length
+ # (Issue #52)
+ def test_conn_1p_0210
+ msg = "payload: #{Time.now.to_f}"
+ dest = make_destination
+ shdrs = { :suppress_content_length => true }
+ assert_nothing_raised {
+ @conn.publish dest, msg, shdrs
+ }
+ #
+ sid = @conn.uuid()
+ @conn.subscribe dest, :id => sid
+ #
+ received = @conn.receive
+ assert_equal msg, received.body
+ assert_nil received.headers["content-length"], "No content length expected."
+ end if ENV['STOMP_AMQ11']
private
def hb_asserts_both(conn)
assert conn.hbsend_interval > 0