diff --git a/ballerina/tests/queue_producer_consumer_tests.bal b/ballerina/tests/queue_producer_consumer_tests.bal index e9a6bcf..bc1faf0 100644 --- a/ballerina/tests/queue_producer_consumer_tests.bal +++ b/ballerina/tests/queue_producer_consumer_tests.bal @@ -549,14 +549,6 @@ function produceMessagesWithIdentification() returns error? { check queueManager.disconnect(); } -function trimTrailingZeros(byte[] bytes) returns byte[] { - int i = bytes.length() - 1; - while (i >= 0 && bytes[i] == 0) { - i -= 1; - } - return bytes.slice(0, i + 1); -} - @test:Config { groups: ["ibmmqQueue", "charset"] } @@ -796,3 +788,11 @@ function produceConsumeWithMsgIdAndInvalidCorrId() returns error? { check queue->close(); check queueManager.disconnect(); } + +function trimTrailingZeros(byte[] bytes) returns byte[] { + int i = bytes.length() - 1; + while (i >= 0 && bytes[i] == 0) { + i -= 1; + } + return bytes.slice(0, i + 1); +}