Skip to content

Commit 964dd9f

Browse files
committed
Fix JMS tests according to new SF requirements
1 parent 559fbf7 commit 964dd9f

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

spring-integration-jms/src/test/java/org/springframework/integration/jms/StubQueue.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,26 @@
1616

1717
package org.springframework.integration.jms;
1818

19-
import jakarta.jms.JMSException;
2019
import jakarta.jms.Queue;
2120

2221
/**
2322
* @author Mark Fisher
23+
* @author Artem Bilan
2424
*/
2525
public class StubQueue implements Queue {
2626

27-
public String getQueueName() throws JMSException {
28-
return null;
27+
private final String name;
28+
29+
public StubQueue() {
30+
this.name = null;
31+
}
32+
33+
public StubQueue(String name) {
34+
this.name = name;
35+
}
36+
37+
public String getQueueName() {
38+
return this.name;
2939
}
3040

3141
}

spring-integration-jms/src/test/java/org/springframework/integration/jms/StubSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ public MessageProducer createProducer(Destination destination) throws JMSExcepti
125125
}
126126

127127
@Override
128-
public Queue createQueue(String queueName) throws JMSException {
129-
return null;
128+
public Queue createQueue(String queueName) {
129+
return new StubQueue(queueName);
130130
}
131131

132132
@Override

0 commit comments

Comments
 (0)