From a184d1301233e521acf3df97bd52b853390ed95a Mon Sep 17 00:00:00 2001 From: ayeshLK Date: Thu, 5 Sep 2024 11:25:41 +0530 Subject: [PATCH] Restructure the test code --- .../tests/queue_producer_consumer_tests.bal | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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); +}