Skip to content

Commit dc57e5c

Browse files
committed
Fix test failures
1 parent 5506926 commit dc57e5c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ballerina/tests/jms_listener_validation_tests.bal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ isolated function testSvcOnErrorWithoutParameters() returns error? {
183183
if result is Error {
184184
test:assertEquals(
185185
result.message(),
186-
"Failed to attach service to listener: onError method must have exactly one parameter.",
186+
"Failed to attach service to listener: onError method must have exactly one parameter of type 'jms:Error'.",
187187
"Invalid error message received");
188188
}
189189
}
@@ -229,7 +229,7 @@ isolated function testSvcOnErrorWithAdditionalParameters() returns error? {
229229
if result is Error {
230230
test:assertEquals(
231231
result.message(),
232-
"Failed to attach service to listener: onError method must have exactly one parameter.",
232+
"Failed to attach service to listener: onError method must have exactly one parameter of type 'jms:Error'.",
233233
"Invalid error message received");
234234
}
235235
}

native/src/main/java/io/ballerina/stdlib/java.jms/listener/Service.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ private static void validateOnMessageMethod(RemoteMethodType onMessageMethod) {
141141

142142
private static void validateOnErrorMethod(RemoteMethodType onErrorMethod) {
143143
if (onErrorMethod.getParameters().length != 1) {
144-
throw CommonUtils.createError(JMS_ERROR, "onError method must have exactly one parameter of type 'jms:Error'.");
144+
throw CommonUtils.createError(JMS_ERROR,
145+
"onError method must have exactly one parameter of type 'jms:Error'.");
145146
}
146147

147148
Parameter parameter = onErrorMethod.getParameters()[0];

0 commit comments

Comments
 (0)