Skip to content

Commit 4199744

Browse files
Fix flakiness in AdvisoryViaNetworkTest by verifying peer broker info on both sides for duplex network (#1867)
1 parent ac047b6 commit 4199744

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

activemq-unit-tests/src/test/java/org/apache/activemq/usecases/AdvisoryViaNetworkTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public void testAdvisoryPrefetchSize() throws Exception {
105105

106106
startAllBrokers();
107107
verifyPeerBrokerInfo(brokers.get("A"), 1);
108+
verifyPeerBrokerInfo(brokers.get("B"), 1);
108109

109110
createConsumer("A", topic1);
110111
createConsumer("A", new ActiveMQTopic("A.FOO2"));
@@ -142,6 +143,7 @@ public void testAdvisoryPrefetchSize1() throws Exception {
142143

143144
startAllBrokers();
144145
verifyPeerBrokerInfo(brokers.get("A"), 1);
146+
verifyPeerBrokerInfo(brokers.get("B"), 1);
145147

146148
createConsumer("A", topic1);
147149
createConsumer("A", new ActiveMQTopic("A.FOO2"));
@@ -177,6 +179,7 @@ public void testAdvisoryPrefetchSizeNotSet() throws Exception {
177179

178180
startAllBrokers();
179181
verifyPeerBrokerInfo(brokers.get("A"), 1);
182+
verifyPeerBrokerInfo(brokers.get("B"), 1);
180183

181184
createConsumer("A", topic1);
182185
createConsumer("A", new ActiveMQTopic("A.FOO2"));
@@ -211,6 +214,7 @@ public void testPrefetchSize1() throws Exception {
211214

212215
startAllBrokers();
213216
verifyPeerBrokerInfo(brokers.get("A"), 1);
217+
verifyPeerBrokerInfo(brokers.get("B"), 1);
214218

215219
createConsumer("A", topic1);
216220
createConsumer("A", new ActiveMQTopic("A.FOO2"));
@@ -243,6 +247,7 @@ public void testAdvisoryPrefetchSizePercent() throws Exception {
243247

244248
startAllBrokers();
245249
verifyPeerBrokerInfo(brokers.get("A"), 1);
250+
verifyPeerBrokerInfo(brokers.get("B"), 1);
246251

247252
for (int i = 0; i < 10; i++) {
248253
createConsumer("A", new ActiveMQTopic("A.FOO"));
@@ -270,6 +275,7 @@ public void testPrefetchSizePercent() throws Exception {
270275

271276
startAllBrokers();
272277
verifyPeerBrokerInfo(brokers.get("A"), 1);
278+
verifyPeerBrokerInfo(brokers.get("B"), 1);
273279

274280
for (int i = 0; i < 10; i++) {
275281
createConsumer("A", new ActiveMQTopic("A.FOO"));

0 commit comments

Comments
 (0)