|
13 | 13 | |
14 | 14 | package com.rabbitmq.stream.impl; |
15 | 15 |
|
| 16 | +import static com.rabbitmq.stream.impl.TestUtils.*; |
16 | 17 | import static com.rabbitmq.stream.impl.TestUtils.ResponseConditions.ok; |
17 | | -import static com.rabbitmq.stream.impl.TestUtils.b; |
18 | | -import static com.rabbitmq.stream.impl.TestUtils.latchAssert; |
19 | | -import static com.rabbitmq.stream.impl.TestUtils.streamName; |
20 | 18 | import static java.util.Collections.singletonList; |
21 | 19 | import static java.util.concurrent.TimeUnit.SECONDS; |
22 | 20 | import static org.assertj.core.api.Assertions.assertThat; |
@@ -127,25 +125,46 @@ void publishToStreamQueueConsumeFromStream(Codec codec) throws Exception { |
127 | 125 | assertThat(m.getProperties().getCorrelationIdAsString()) |
128 | 126 | .isEqualTo("correlation id")), |
129 | 127 | ptc( |
| 128 | + BEFORE_MESSAGE_CONTAINERS, |
130 | 129 | b -> b.deliveryMode(2), |
131 | 130 | m -> |
132 | 131 | assertThat(m.getMessageAnnotations().get("x-basic-delivery-mode")) |
133 | 132 | .isEqualTo(UnsignedByte.valueOf("2"))), |
134 | 133 | ptc( |
| 134 | + AFTER_MESSAGE_CONTAINERS, |
| 135 | + b -> b.deliveryMode(2), |
| 136 | + m -> |
| 137 | + assertThat(m.getMessageAnnotations()) |
| 138 | + .doesNotContainKeys(("x-basic-delivery-mode"))), |
| 139 | + ptc( |
| 140 | + BEFORE_MESSAGE_CONTAINERS, |
135 | 141 | b -> b.expiration(String.valueOf(60_000)), |
136 | 142 | m -> |
137 | 143 | assertThat(m.getMessageAnnotations().get("x-basic-expiration")) |
138 | 144 | .isEqualTo(String.valueOf(60_000))), |
| 145 | + ptc( |
| 146 | + AFTER_MESSAGE_CONTAINERS, |
| 147 | + b -> b.expiration(String.valueOf(60_000)), |
| 148 | + m -> |
| 149 | + assertThat(m.getMessageAnnotations()) |
| 150 | + .doesNotContainKeys("x-basic-expiration")), |
139 | 151 | ptc( |
140 | 152 | b -> b.messageId("message id"), |
141 | 153 | m -> |
142 | 154 | assertThat(m.getProperties().getMessageIdAsString()) |
143 | 155 | .isEqualTo("message id")), |
144 | 156 | ptc( |
| 157 | + BEFORE_MESSAGE_CONTAINERS, |
145 | 158 | b -> b.priority(5), |
146 | 159 | m -> |
147 | 160 | assertThat(m.getMessageAnnotations().get("x-basic-priority")) |
148 | 161 | .isEqualTo(UnsignedByte.valueOf("5"))), |
| 162 | + ptc( |
| 163 | + AFTER_MESSAGE_CONTAINERS, |
| 164 | + b -> b.priority(5), |
| 165 | + m -> |
| 166 | + assertThat(m.getMessageAnnotations()) |
| 167 | + .doesNotContainKeys("x-basic-priority")), |
149 | 168 | ptc( |
150 | 169 | b -> b.replyTo("reply to"), |
151 | 170 | m -> assertThat(m.getProperties().getReplyTo()).isEqualTo("reply to")), |
|
0 commit comments