Skip to content

Commit

Permalink
fix bit field concat
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaykm committed Sep 27, 2016
1 parent 69e5b0f commit e4a0f5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function TAMQPBit(b::TAMQPBit, pos::Int)
end

function TAMQPBit(b::TAMQPBit, setbit::TAMQPBit, pos::Int)
TAMQPBit(b.val & (setbit.val << (pos-1)))
TAMQPBit(b.val | (setbit.val << (pos-1)))
end

immutable TAMQPDecimalValue
Expand Down
7 changes: 4 additions & 3 deletions test/test_throughput.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const QUEUE1 = "queue1"
const ROUTE1 = "key1"
const MSG_SIZE = 1024
const NMSGS = 10^6
const no_ack = true

const M = Message(rand(UInt8, 1024), content_type="application/octet-stream", delivery_mode=PERSISTENT)

Expand Down Expand Up @@ -64,7 +65,7 @@ function publish(conn, chan1)
basic_publish(chan1, M; exchange=EXCG_DIRECT, routing_key=ROUTE1)
if (idx % 10000) == 0
println("publishing $idx ...")
sleep(2)
sleep(1)
end
end
end
Expand All @@ -83,12 +84,12 @@ function consume(conn, chan1)
#basic_ack(chan1, 0; all_upto=true)
println("ack sent $msg_count ...")
end
basic_ack(chan1, rcvd_msg.delivery_tag)
no_ack || basic_ack(chan1, rcvd_msg.delivery_tag)
if msg_count == NMSGS
end_time = time()
end
end
success, consumer_tag = basic_consume(chan1, QUEUE1, consumer_fn)
success, consumer_tag = basic_consume(chan1, QUEUE1, consumer_fn; no_ack=no_ack)
@test success

# wait to receive all messages
Expand Down

0 comments on commit e4a0f5d

Please sign in to comment.