Skip to content

Commit

Permalink
Fix byte vector conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Aug 16, 2018
1 parent 4150c41 commit caf1f75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/test_coverage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function runtests(;virtualhost="/", host="localhost", port=AMQPClient.AMQP_DEFAU
# rabbitmq 3.6.5 does not support qos
# basic_qos(chan1, 1024*10, 10, false)

M = Message(codeunits("hello world"), content_type="text/plain", delivery_mode=PERSISTENT)
M = Message(Vector{UInt8}("hello world"), content_type="text/plain", delivery_mode=PERSISTENT)

testlog("testing basic publish and get...")
# publish 10 messages
Expand Down
4 changes: 2 additions & 2 deletions test/test_rpc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function test_rpc_client(;virtualhost="/", host="localhost", port=AMQPClient.AMQ
# publish NRPC_MSGS messages to the queue
while correlation_id < NRPC_MSGS
correlation_id += 1
M = Message(codeunits("hello from " * queue_name), content_type="text/plain", delivery_mode=PERSISTENT, reply_to=queue_name, correlation_id=string(correlation_id))
M = Message(Vector{UInt8}("hello from " * queue_name), content_type="text/plain", delivery_mode=PERSISTENT, reply_to=queue_name, correlation_id=string(correlation_id))
basic_publish(chan1, M; exchange=default_exchange_name(), routing_key=QUEUE_RPC)
# sleep a random time between 1 and 5 seconds between requests
sleep(rand())
Expand Down Expand Up @@ -116,7 +116,7 @@ function test_rpc_server(;virtualhost="/", host="localhost", port=AMQPClient.AMQ
resp_str = "$(my_server_id) received msg $(rpc_count) - $(reply_to): $(String(rcvd_msg.data))"
println("server ", resp_str)

M = Message(codeunits(resp_str), content_type="text/plain", delivery_mode=PERSISTENT, correlation_id=correlation_id)
M = Message(Vector{UInt8}(resp_str), content_type="text/plain", delivery_mode=PERSISTENT, correlation_id=correlation_id)
basic_publish(chan1, M; exchange=default_exchange_name(), routing_key=reply_to)

basic_ack(chan1, rcvd_msg.delivery_tag)
Expand Down

0 comments on commit caf1f75

Please sign in to comment.