Skip to content

Commit caf1f75

Browse files
committed
Fix byte vector conversions
1 parent 4150c41 commit caf1f75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/test_coverage.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function runtests(;virtualhost="/", host="localhost", port=AMQPClient.AMQP_DEFAU
4848
# rabbitmq 3.6.5 does not support qos
4949
# basic_qos(chan1, 1024*10, 10, false)
5050

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

5353
testlog("testing basic publish and get...")
5454
# publish 10 messages

test/test_rpc.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function test_rpc_client(;virtualhost="/", host="localhost", port=AMQPClient.AMQ
5050
# publish NRPC_MSGS messages to the queue
5151
while correlation_id < NRPC_MSGS
5252
correlation_id += 1
53-
M = Message(codeunits("hello from " * queue_name), content_type="text/plain", delivery_mode=PERSISTENT, reply_to=queue_name, correlation_id=string(correlation_id))
53+
M = Message(Vector{UInt8}("hello from " * queue_name), content_type="text/plain", delivery_mode=PERSISTENT, reply_to=queue_name, correlation_id=string(correlation_id))
5454
basic_publish(chan1, M; exchange=default_exchange_name(), routing_key=QUEUE_RPC)
5555
# sleep a random time between 1 and 5 seconds between requests
5656
sleep(rand())
@@ -116,7 +116,7 @@ function test_rpc_server(;virtualhost="/", host="localhost", port=AMQPClient.AMQ
116116
resp_str = "$(my_server_id) received msg $(rpc_count) - $(reply_to): $(String(rcvd_msg.data))"
117117
println("server ", resp_str)
118118

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

122122
basic_ack(chan1, rcvd_msg.delivery_tag)

0 commit comments

Comments
 (0)