NO-JIRA Fixing intermittent test failure
waiting advisory to update client on openwire client
This commit is contained in:
parent
b07ae7af7c
commit
c3beea3a9e
|
@ -32,8 +32,8 @@ public class OpenWireJMSClusteredTestBase extends ClusterTestBase {
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
setupServer(0, true, true);
|
setupServer(0, isFileStorage(), true);
|
||||||
setupServer(1, true, true);
|
setupServer(1, isFileStorage(), true);
|
||||||
|
|
||||||
setupClusterConnection("cluster0", "", MessageLoadBalancingType.ON_DEMAND, 1, true, 0, 1);
|
setupClusterConnection("cluster0", "", MessageLoadBalancingType.ON_DEMAND, 1, true, 0, 1);
|
||||||
setupClusterConnection("cluster1", "", MessageLoadBalancingType.ON_DEMAND, 1, true, 1, 0);
|
setupClusterConnection("cluster1", "", MessageLoadBalancingType.ON_DEMAND, 1, true, 1, 0);
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq.artemis.tests.integration.openwire.cluster;
|
package org.apache.activemq.artemis.tests.integration.openwire.cluster;
|
||||||
|
|
||||||
|
import org.apache.activemq.ActiveMQConnection;
|
||||||
import org.apache.activemq.artemis.api.core.RoutingType;
|
import org.apache.activemq.artemis.api.core.RoutingType;
|
||||||
import org.apache.activemq.artemis.api.core.SimpleString;
|
import org.apache.activemq.artemis.api.core.SimpleString;
|
||||||
import org.apache.activemq.artemis.utils.Wait;
|
import org.apache.activemq.artemis.utils.Wait;
|
||||||
|
@ -130,6 +131,9 @@ public class TemporaryQueueClusterTest extends OpenWireJMSClusteredTestBase {
|
||||||
prod1.send(message);
|
prod1.send(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// waiting the advisory to update the activeTempDestinations
|
||||||
|
Wait.assertTrue(() -> ((ActiveMQConnection) conn2).activeTempDestinations.containsValue(tempQueue));
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
if (i % 2 == 0) {
|
if (i % 2 == 0) {
|
||||||
TextMessage received = (TextMessage) cons2.receive(5000);
|
TextMessage received = (TextMessage) cons2.receive(5000);
|
||||||
|
|
Loading…
Reference in New Issue