Skip to content

Commit 73e1874

Browse files
committed
GH-1289: Fix test for back port
- `CorrelationData` needs an id (`null` by default before 2.3).
1 parent c72298f commit 73e1874

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitTemplatePublisherCallbacksIntegrationTests2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ private void routingWithConfirms(boolean listener) throws Exception {
116116
});
117117
}
118118
this.templateWithConfirmsEnabled.setMandatory(true);
119-
CorrelationData corr = new CorrelationData();
119+
CorrelationData corr = new CorrelationData("foo");
120120
this.templateWithConfirmsEnabled.convertAndSend("", ROUTE2, "foo", corr);
121121
assertThat(corr.getFuture().get(10, TimeUnit.SECONDS).isAck()).isTrue();
122122
if (listener) {
123123
assertThat(latch.await(10, TimeUnit.SECONDS)).isTrue();
124124
}
125-
corr = new CorrelationData();
125+
corr = new CorrelationData("bar");
126126
this.templateWithConfirmsEnabled.convertAndSend("", "bad route", "foo", corr);
127127
assertThat(corr.getFuture().get(10, TimeUnit.SECONDS).isAck()).isTrue();
128128
assertThat(corr.getReturnedMessage()).isNotNull();

0 commit comments

Comments
 (0)