ARTEMIS-2741 Passing call timeout to cluster connection bridge
This one should improve eventual failures on ClusterConnectionControlTest to validate this, run ClusterConnectionControlTest::testNotifications in a loop you will see eventually the test taking longer to shutdown the executor as the call could be blocked.
This commit is contained in:
parent
b27f381389
commit
4c28297685
|
@ -190,6 +190,8 @@ public class ClusterController implements ActiveMQComponent {
|
||||||
//if the cluster isn't available we want to hang around until it is
|
//if the cluster isn't available we want to hang around until it is
|
||||||
serverLocator.setReconnectAttempts(config.getReconnectAttempts());
|
serverLocator.setReconnectAttempts(config.getReconnectAttempts());
|
||||||
serverLocator.setInitialConnectAttempts(config.getInitialConnectAttempts());
|
serverLocator.setInitialConnectAttempts(config.getInitialConnectAttempts());
|
||||||
|
serverLocator.setCallTimeout(config.getCallTimeout());
|
||||||
|
serverLocator.setCallFailoverTimeout(config.getCallFailoverTimeout());
|
||||||
serverLocator.setRetryInterval(config.getRetryInterval());
|
serverLocator.setRetryInterval(config.getRetryInterval());
|
||||||
serverLocator.setRetryIntervalMultiplier(config.getRetryIntervalMultiplier());
|
serverLocator.setRetryIntervalMultiplier(config.getRetryIntervalMultiplier());
|
||||||
serverLocator.setMaxRetryInterval(config.getMaxRetryInterval());
|
serverLocator.setMaxRetryInterval(config.getMaxRetryInterval());
|
||||||
|
|
|
@ -811,6 +811,8 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
|
||||||
targetLocator.setMaxRetryInterval(maxRetryInterval);
|
targetLocator.setMaxRetryInterval(maxRetryInterval);
|
||||||
targetLocator.setRetryIntervalMultiplier(retryIntervalMultiplier);
|
targetLocator.setRetryIntervalMultiplier(retryIntervalMultiplier);
|
||||||
targetLocator.setMinLargeMessageSize(minLargeMessageSize);
|
targetLocator.setMinLargeMessageSize(minLargeMessageSize);
|
||||||
|
targetLocator.setCallTimeout(serverLocator.getCallTimeout());
|
||||||
|
targetLocator.setCallFailoverTimeout(serverLocator.getCallFailoverTimeout());
|
||||||
|
|
||||||
// No producer flow control on the bridges by default, as we don't want to lock the queues
|
// No producer flow control on the bridges by default, as we don't want to lock the queues
|
||||||
targetLocator.setProducerWindowSize(this.producerWindowSize);
|
targetLocator.setProducerWindowSize(this.producerWindowSize);
|
||||||
|
|
|
@ -208,9 +208,9 @@ public class ClusterConnectionControlTest extends ManagementTestBase {
|
||||||
|
|
||||||
Configuration conf_1 = createBasicConfig().addAcceptorConfiguration(acceptorConfig).addQueueConfiguration(queueConfig);
|
Configuration conf_1 = createBasicConfig().addAcceptorConfiguration(acceptorConfig).addQueueConfiguration(queueConfig);
|
||||||
|
|
||||||
clusterConnectionConfig1 = new ClusterConnectionConfiguration().setName(RandomUtil.randomString()).setAddress(queueConfig.getAddress().toString()).setConnectorName(connectorConfig.getName()).setRetryInterval(RandomUtil.randomPositiveLong()).setDuplicateDetection(RandomUtil.randomBoolean()).setMessageLoadBalancingType(MessageLoadBalancingType.STRICT).setMaxHops(RandomUtil.randomPositiveInt()).setConfirmationWindowSize(RandomUtil.randomPositiveInt()).setMessageLoadBalancingType(MessageLoadBalancingType.ON_DEMAND).setStaticConnectors(connectors);
|
clusterConnectionConfig1 = new ClusterConnectionConfiguration().setName(RandomUtil.randomString()).setAddress(queueConfig.getAddress().toString()).setConnectorName(connectorConfig.getName()).setRetryInterval(RandomUtil.randomPositiveLong()).setDuplicateDetection(RandomUtil.randomBoolean()).setMessageLoadBalancingType(MessageLoadBalancingType.STRICT).setMaxHops(RandomUtil.randomPositiveInt()).setConfirmationWindowSize(RandomUtil.randomPositiveInt()).setMessageLoadBalancingType(MessageLoadBalancingType.ON_DEMAND).setStaticConnectors(connectors).setCallTimeout(500).setCallFailoverTimeout(500);
|
||||||
|
|
||||||
clusterConnectionConfig2 = new ClusterConnectionConfiguration().setName(RandomUtil.randomString()).setAddress(queueConfig.getAddress().toString()).setConnectorName(connectorConfig.getName()).setRetryInterval(RandomUtil.randomPositiveLong()).setDuplicateDetection(RandomUtil.randomBoolean()).setMessageLoadBalancingType(MessageLoadBalancingType.OFF).setMaxHops(RandomUtil.randomPositiveInt()).setConfirmationWindowSize(RandomUtil.randomPositiveInt()).setMessageLoadBalancingType(MessageLoadBalancingType.ON_DEMAND).setDiscoveryGroupName(discoveryGroupName);
|
clusterConnectionConfig2 = new ClusterConnectionConfiguration().setName(RandomUtil.randomString()).setAddress(queueConfig.getAddress().toString()).setConnectorName(connectorConfig.getName()).setRetryInterval(RandomUtil.randomPositiveLong()).setDuplicateDetection(RandomUtil.randomBoolean()).setMessageLoadBalancingType(MessageLoadBalancingType.OFF).setMaxHops(RandomUtil.randomPositiveInt()).setConfirmationWindowSize(RandomUtil.randomPositiveInt()).setMessageLoadBalancingType(MessageLoadBalancingType.ON_DEMAND).setDiscoveryGroupName(discoveryGroupName).setCallTimeout(500).setCallFailoverTimeout(500);
|
||||||
|
|
||||||
Configuration conf_0 = createBasicConfig().addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())).addConnectorConfiguration(connectorConfig.getName(), connectorConfig).addClusterConfiguration(clusterConnectionConfig1).addClusterConfiguration(clusterConnectionConfig2).addDiscoveryGroupConfiguration(discoveryGroupName, discoveryGroupConfig);
|
Configuration conf_0 = createBasicConfig().addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getName())).addConnectorConfiguration(connectorConfig.getName(), connectorConfig).addClusterConfiguration(clusterConnectionConfig1).addClusterConfiguration(clusterConnectionConfig2).addDiscoveryGroupConfiguration(discoveryGroupName, discoveryGroupConfig);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue