SGF-378 - SDG completely ignores the 'socket-read-timeout' attribute on the Gateway element nested in a GatewayHub.
This commit is contained in:
@@ -100,7 +100,7 @@ public class GatewayHubNamespaceTest {
|
||||
assertEquals(8, gatewayOne.getConcurrencyLevel());
|
||||
assertEquals(Gateway.OrderPolicy.THREAD, gatewayOne.getOrderPolicy());
|
||||
assertEquals(65536, gatewayOne.getSocketBufferSize());
|
||||
//assertEquals(120, gatewayOne.getSocketReadTimeout());
|
||||
assertEquals(15000, gatewayOne.getSocketReadTimeout());
|
||||
assertNotNull(gatewayOne.getListeners());
|
||||
assertFalse(gatewayOne.getListeners().isEmpty());
|
||||
assertEquals(1, gatewayOne.getListeners().size());
|
||||
|
||||
@@ -206,7 +206,7 @@ public class GatewayHubFactoryBeanTest {
|
||||
gatewayProxy.setOrderPolicy(Gateway.OrderPolicy.THREAD);
|
||||
gatewayProxy.setQueue(gatewayQueue);
|
||||
gatewayProxy.setSocketBufferSize(16384);
|
||||
//gatewayProxy.setSocketReadTimeout(300);
|
||||
gatewayProxy.setSocketReadTimeout(300);
|
||||
|
||||
GatewayHub mockGatewayHub = mock(GatewayHub.class, "testDoInit.MockGatewayHub");
|
||||
|
||||
@@ -248,7 +248,7 @@ public class GatewayHubFactoryBeanTest {
|
||||
verify(mockGateway, times(1)).addListener(same(mockGatewayListener));
|
||||
verify(mockGateway, times(1)).setOrderPolicy(eq(gatewayProxy.getOrderPolicy()));
|
||||
verify(mockGateway, times(1)).setSocketBufferSize(eq(gatewayProxy.getSocketBufferSize()));
|
||||
//verify(mockGateway, times(1)).setSocketReadTimeout(eq(gatewayProxy.getSocketReadTimeout()));
|
||||
verify(mockGateway, times(1)).setSocketReadTimeout(eq(gatewayProxy.getSocketReadTimeout()));
|
||||
verify(mockGateway, times(1)).getQueueAttributes();
|
||||
verify(mockGatewayQueueAttributes, times(1)).setAlertThreshold(eq(gatewayQueue.getAlertThreshold()));
|
||||
verify(mockGatewayQueueAttributes, times(1)).setBatchConflation(eq(gatewayQueue.getEnableBatchConflation()));
|
||||
@@ -282,7 +282,7 @@ public class GatewayHubFactoryBeanTest {
|
||||
gatewayProxy.setOrderPolicy(Gateway.OrderPolicy.THREAD);
|
||||
gatewayProxy.setQueue(gatewayQueue);
|
||||
gatewayProxy.setSocketBufferSize(4096);
|
||||
//gatewayProxy.setSocketReadTimeout(60);
|
||||
gatewayProxy.setSocketReadTimeout(60);
|
||||
|
||||
GatewayHub mockGatewayHub = mock(GatewayHub.class, "testGatewayQueueWithOverflowNoPersistence.MockGatewayHub");
|
||||
|
||||
@@ -312,7 +312,7 @@ public class GatewayHubFactoryBeanTest {
|
||||
verify(mockGatewayHub, times(1)).addGateway(eq(gatewayProxy.getId()), eq(gatewayProxy.getConcurrencyLevel()));
|
||||
verify(mockGateway, times(1)).setOrderPolicy(eq(gatewayProxy.getOrderPolicy()));
|
||||
verify(mockGateway, times(1)).setSocketBufferSize(eq(gatewayProxy.getSocketBufferSize()));
|
||||
//verify(mockGateway, times(1)).setSocketReadTimeout(eq(gatewayProxy.getSocketReadTimeout()));
|
||||
verify(mockGateway, times(1)).setSocketReadTimeout(eq(gatewayProxy.getSocketReadTimeout()));
|
||||
verify(mockGatewayQueueAttributes, times(1)).setAlertThreshold(gatewayQueue.getAlertThreshold());
|
||||
verify(mockGatewayQueueAttributes, times(1)).setBatchConflation(gatewayQueue.getEnableBatchConflation());
|
||||
verify(mockGatewayQueueAttributes, times(1)).setBatchSize(gatewayQueue.getBatchSize());
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
|
||||
<gfe:gateway-hub id="testGatewayHub" bind-address="localhost" manual-start="true" max-time-between-pings="5000"
|
||||
port="45123" socket-buffer-size="16384" startup-policy="primary">
|
||||
<gfe:gateway gateway-id="gateway1" concurrency-level="8" order-policy="thread" socket-buffer-size="65536">
|
||||
<gfe:gateway gateway-id="gateway1" concurrency-level="8" order-policy="thread" socket-buffer-size="65536"
|
||||
socket-read-timeout="15000">
|
||||
<gfe:gateway-listener>
|
||||
<bean class="org.springframework.data.gemfire.config.GatewayHubNamespaceTest.TestGatewayListener"/>
|
||||
</gfe:gateway-listener>
|
||||
|
||||
Reference in New Issue
Block a user