You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-7-since-1-6.adoc
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ The framework is no longer compatible with previous versions.
51
51
== JUnit `@Rules`
52
52
53
53
Rules that have previously been used internally by the framework have now been made available in a separate jar called `spring-rabbit-junit`.
54
-
See xref:testing.adoc#junit-rules[JUnit4 `@Rules`] for more information.
54
+
See <<junit4-rules>> for more information.
55
55
56
56
[[container-conditional-rollback]]
57
57
== Container Conditional Rollback
@@ -74,3 +74,32 @@ See xref:amqp/connections.adoc[Connection and Resource Management] for more info
74
74
You can now configure message re-queue on transaction rollback to be consistent, regardless of whether or not a transaction manager is configured.
75
75
See xref:amqp/transactions.adoc#transaction-rollback[A note on Rollback of Received Messages] for more information.
76
76
77
+
[[junit4-rules]]
78
+
== JUnit4 `@Rules`
79
+
80
+
Spring AMQP version 1.7 and later provide an additional jar called `spring-rabbit-junit`.
81
+
This jar contains a couple of utility `@Rule` instances for use when running JUnit4 tests.
82
+
See xref:testing.adoc#junit5-conditions[JUnit5 Conditions] for JUnit5 testing.
83
+
84
+
[[using-brokerrunning]]
85
+
=== Using `BrokerRunning`
86
+
87
+
`BrokerRunning` provides a mechanism to let tests succeed when a broker is not running (on `localhost`, by default).
88
+
89
+
It also has utility methods to initialize and empty queues and delete queues and exchanges.
90
+
91
+
The following example shows its usage:
92
+
93
+
[source, java]
94
+
----
95
+
96
+
@ClassRule
97
+
public static BrokerRunning brokerRunning = BrokerRunning.isRunningWithEmptyQueues("foo", "bar");
98
+
99
+
@AfterClass
100
+
public static void tearDown() {
101
+
brokerRunning.removeTestQueues("some.other.queue.too"); // removes foo, bar as well
102
+
}
103
+
----
104
+
105
+
There are several `isRunning...` static methods, such as `isBrokerAndManagementRunning()`, which verifies the broker has the management plugin enabled.
Copy file name to clipboardExpand all lines: src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-2-2-since-2-1.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ JUnit (4) is now an optional dependency and will no longer appear as a transitiv
21
21
22
22
The `spring-rabbit-junit` module is now a *compile* dependency in the `spring-rabbit-test` module for a better target application development experience when with only a single `spring-rabbit-test` we get the full stack of testing utilities for AMQP components.
23
23
24
-
[[-breaking-api-changes]]
24
+
[[breaking-api-changes]]
25
25
== "Breaking" API Changes
26
26
27
27
the JUnit (5) `RabbitAvailableCondition.getBrokerRunning()` now returns a `BrokerRunningSupport` instance instead of a `BrokerRunning`, which depends on JUnit 4.
@@ -87,7 +87,7 @@ See xref:logging.adoc[Logging Subsystem AMQP Appenders] for more information.
87
87
The `MessageListenerAdapter` provides now a new `buildListenerArguments(Object, Channel, Message)` method to build an array of arguments to be passed into target listener and an old one is deprecated.
88
88
See xref:amqp/receiving-messages/async-consumer.adoc#message-listener-adapter[`MessageListenerAdapter`] for more information.
89
89
90
-
[[exchange/queue-declaration-changes]]
90
+
[[exchange-queue-declaration-changes]]
91
91
== Exchange/Queue Declaration Changes
92
92
93
93
The `ExchangeBuilder` and `QueueBuilder` fluent APIs used to create `Exchange` and `Queue` objects for declaration by `RabbitAdmin` now support "well known" arguments.
0 commit comments