Skip to content

Commit

Permalink
Restructure the test code
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Sep 5, 2024
1 parent 2fe938f commit a184d13
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ballerina/tests/queue_producer_consumer_tests.bal
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
Expand Down Expand Up @@ -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);
}

0 comments on commit a184d13

Please sign in to comment.