|
17 | 17 | package org.springframework.amqp.rabbit.core;
|
18 | 18 |
|
19 | 19 | import static org.assertj.core.api.Assertions.assertThat;
|
| 20 | +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; |
20 | 21 | import static org.awaitility.Awaitility.await;
|
21 | 22 |
|
| 23 | +import java.io.IOException; |
22 | 24 | import java.net.MalformedURLException;
|
23 | 25 | import java.net.URISyntaxException;
|
24 | 26 | import java.util.Collections;
|
|
29 | 31 | import org.junit.jupiter.api.AfterEach;
|
30 | 32 | import org.junit.jupiter.api.Test;
|
31 | 33 |
|
| 34 | +import org.springframework.amqp.AmqpException; |
32 | 35 | import org.springframework.amqp.core.Binding;
|
33 | 36 | import org.springframework.amqp.core.BindingBuilder;
|
34 | 37 | import org.springframework.amqp.core.DirectExchange;
|
@@ -217,7 +220,12 @@ public void testDeleteExchange() {
|
217 | 220 | assertThat(exchangeToAssert.getName()).isEqualTo(testExchange.getName());
|
218 | 221 | assertThat(exchangeToAssert.getType()).isEqualTo(testExchange.getType());
|
219 | 222 | this.rabbitRestClient.deleteExchange("/", testExchange.getName());
|
220 |
| - assertThat(this.rabbitRestClient.getExchange("/", exchangeName)).isNull(); |
| 223 | + // 6.0.0 REST compatibility |
| 224 | +// assertThat(this.rabbitRestClient.getExchange("/", exchangeName)).isNull(); |
| 225 | + RabbitTemplate template = new RabbitTemplate(this.connectionFactory); |
| 226 | + assertThatExceptionOfType(AmqpException.class) |
| 227 | + .isThrownBy(() -> template.execute(channel -> channel.exchangeDeclarePassive(exchangeName))) |
| 228 | + .withCauseExactlyInstanceOf(IOException.class); |
221 | 229 | }
|
222 | 230 |
|
223 | 231 | }
|
0 commit comments