|
15 | 15 | package com.rabbitmq.stream.impl; |
16 | 16 |
|
17 | 17 | import static com.rabbitmq.stream.impl.TestUtils.*; |
| 18 | +import static com.rabbitmq.stream.impl.TestUtils.BrokerVersion.RABBITMQ_4_2_0; |
18 | 19 | import static com.rabbitmq.stream.impl.TestUtils.ResponseConditions.ok; |
| 20 | +import static com.rabbitmq.stream.impl.TestUtils.atLeastVersion; |
19 | 21 | import static java.util.Collections.singletonList; |
20 | 22 | import static java.util.concurrent.TimeUnit.SECONDS; |
21 | 23 | import static org.assertj.core.api.Assertions.assertThat; |
|
44 | 46 | import java.util.stream.Stream; |
45 | 47 | import org.apache.commons.lang3.StringUtils; |
46 | 48 | import org.junit.jupiter.api.TestInfo; |
47 | | -import org.junit.jupiter.api.extension.ExtendWith; |
48 | 49 | import org.junit.jupiter.params.ParameterizedTest; |
49 | 50 | import org.junit.jupiter.params.provider.MethodSource; |
50 | 51 |
|
51 | | -@ExtendWith(TestUtils.StreamTestInfrastructureExtension.class) |
| 52 | +@StreamTestInfrastructure |
52 | 53 | public class AmqpInteroperabilityTest { |
53 | 54 |
|
54 | 55 | static final Charset UTF8 = StandardCharsets.UTF_8; |
@@ -166,7 +167,10 @@ void publishToStreamQueueConsumeFromStream(Codec codec) throws Exception { |
166 | 167 | .doesNotContainKeys("x-basic-priority")), |
167 | 168 | ptc( |
168 | 169 | b -> b.replyTo("reply to"), |
169 | | - m -> assertThat(m.getProperties().getReplyTo()).isEqualTo("reply to")), |
| 170 | + m -> { |
| 171 | + String expected = brokerVersion42Ormore() ? "/queues/reply%20to" : "reply to"; |
| 172 | + assertThat(m.getProperties().getReplyTo()).isEqualTo(expected); |
| 173 | + }), |
170 | 174 | ptc( |
171 | 175 | b -> b.timestamp(timestamp), |
172 | 176 | m -> |
@@ -682,6 +686,10 @@ void messageWithEmptyBodyAndPropertiesShouldBeConvertedInAmqp(Codec codec) throw |
682 | 686 | } |
683 | 687 | } |
684 | 688 |
|
| 689 | + private boolean brokerVersion42Ormore() { |
| 690 | + return atLeastVersion(RABBITMQ_4_2_0.version(), brokerVersion); |
| 691 | + } |
| 692 | + |
685 | 693 | private static class PropertiesTestConfiguration { |
686 | 694 | final Consumer<AMQP.BasicProperties.Builder> builder; |
687 | 695 | final Consumer<Message> assertion; |
|
0 commit comments