SGF-570 - Respect manual-start on Gateway Senders/Receivers but no longer couple the start/stop lifecycle to the Spring container.
(cherry picked from commit 6d8bee2b3461e088b04120f982ec56378ee64c9a) Signed-off-by: John Blum <jblum@pivotal.io>
This commit is contained in:
@@ -62,7 +62,6 @@ public class GatewayReceiverAutoStartNamespaceTest {
|
||||
public void testAuto() throws Exception {
|
||||
assertNotNull("The 'Auto' GatewayReceiverFactoryBean was not properly configured and initialized!",
|
||||
autoGatewayReceiverFactory);
|
||||
assertTrue(autoGatewayReceiverFactory.isAutoStartup());
|
||||
|
||||
GatewayReceiver autoGatewayReceiver = autoGatewayReceiverFactory.getObject();
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ public class GatewayReceiverDefaultStartNamespaceTest {
|
||||
public void testDefault() throws Exception {
|
||||
assertNotNull("The 'Default' GatewayReceiverFactoryBean was not properly configured and initialized!",
|
||||
defaultGatewayReceiverFactory);
|
||||
assertTrue(defaultGatewayReceiverFactory.isAutoStartup());
|
||||
|
||||
GatewayReceiver defaultGatewayReceiver = defaultGatewayReceiverFactory.getObject();
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ public class GatewayReceiverManualStartNamespaceTest {
|
||||
public void testManual() throws Exception {
|
||||
assertNotNull("The 'Manual' GatewayReceiverFactoryBean was not properly configured and initialized!",
|
||||
manualGatewayReceiverFactory);
|
||||
assertFalse(manualGatewayReceiverFactory.isAutoStartup());
|
||||
|
||||
GatewayReceiver manualGatewayReceiver = manualGatewayReceiverFactory.getObject();
|
||||
|
||||
@@ -74,5 +73,4 @@ public class GatewayReceiverManualStartNamespaceTest {
|
||||
assertFalse(manualGatewayReceiver.isRunning());
|
||||
assertEquals(8192, manualGatewayReceiver.getSocketBufferSize());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -141,6 +141,7 @@ public class StubGatewayReceiverFactory implements GatewayReceiverFactory {
|
||||
@Override
|
||||
public GatewayReceiverFactory setManualStart(final boolean manualStart) {
|
||||
this.manualStart = manualStart;
|
||||
this.running = !manualStart;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user