SGF-375 - The <gfe:gateway-hub> XML namespace element is missing the 'max-time-between-pings' attribute.
This commit is contained in:
@@ -83,7 +83,7 @@ public class GatewayHubNamespaceTest {
|
||||
assertEquals("localhost", gatewayHub.getBindAddress());
|
||||
assertEquals("testGatewayHub", gatewayHub.getId());
|
||||
assertTrue(gatewayHub.getManualStart());
|
||||
//assertEquals(GatewayHub.DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS, gatewayHub.getMaximumTimeBetweenPings());
|
||||
assertEquals(5000, gatewayHub.getMaximumTimeBetweenPings());
|
||||
assertEquals(45123, gatewayHub.getPort());
|
||||
assertEquals(16384, gatewayHub.getSocketBufferSize());
|
||||
assertEquals("primary", gatewayHub.getStartupPolicy());
|
||||
|
||||
@@ -51,6 +51,7 @@ public class MockGatewayHubFactory extends AbstractMockerySupport {
|
||||
|
||||
private Boolean manualStart = GatewayHub.DEFAULT_MANUAL_START;
|
||||
|
||||
//private Integer maximumConnections = GatewayHub.DEFAULT_MAXIMUM_CONNECTIONS;
|
||||
private Integer maximumTimeBetweenPings = GatewayHub.DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS;
|
||||
private Integer socketBufferSize = GatewayHub.DEFAULT_SOCKET_BUFFER_SIZE;
|
||||
|
||||
@@ -93,6 +94,21 @@ public class MockGatewayHubFactory extends AbstractMockerySupport {
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
doAnswer(new Answer<Void>() {
|
||||
@Override public Void answer(final InvocationOnMock invocation) throws Throwable {
|
||||
maximumConnections = invocation.getArgumentAt(0, Integer.class);
|
||||
return null;
|
||||
}
|
||||
}).when(mockGatewayHub).setMaximumConnections(anyInt());
|
||||
|
||||
when(mockGatewayHub.getMaximumConnections()).thenAnswer(new Answer<Integer>() {
|
||||
@Override public Integer answer(final InvocationOnMock invocation) throws Throwable {
|
||||
return maximumConnections;
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
doAnswer(new Answer<Void>() {
|
||||
@Override public Void answer(final InvocationOnMock invocation) throws Throwable {
|
||||
maximumTimeBetweenPings = invocation.getArgumentAt(0, Integer.class);
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<gfe:disk-dir location="./gemfire/GatewayHubNamespaceTest/Gateway/Queue"/>
|
||||
</gfe:disk-store>
|
||||
|
||||
<gfe:gateway-hub id="testGatewayHub" bind-address="localhost" manual-start="true" port="45123"
|
||||
socket-buffer-size="16384" startup-policy="primary">
|
||||
<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-listener>
|
||||
<bean class="org.springframework.data.gemfire.config.GatewayHubNamespaceTest.TestGatewayListener"/>
|
||||
|
||||
Reference in New Issue
Block a user