SGF-375 - The <gfe:gateway-hub> XML namespace element is missing the 'max-time-between-pings' attribute.

This commit is contained in:
John Blum
2015-02-24 14:47:12 -08:00
parent a5b743989b
commit d42d5b57fe
7 changed files with 90 additions and 75 deletions

View File

@@ -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());

View File

@@ -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);

View File

@@ -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"/>