Class SimpleStartStopServiceManagerTest
- java.lang.Object
-
- test.de.iip_ecosphere.platform.services.spring.AbstractTestServiceManager
-
- test.de.iip_ecosphere.platform.services.spring.SimpleStartStopServiceManagerTest
-
@SpringBootTest(classes=Config.class) @TestPropertySource(locations="classpath:iipecosphere.yml") @ContextConfiguration(initializers=Initializer.class) @Import(de.iip_ecosphere.platform.services.spring.SpringCloudServiceSetup.class) public class SimpleStartStopServiceManagerTest extends AbstractTestServiceManager
TestsSpringCloudServiceManager. We assume that the test artifacts are prepared for MQTT v3.- Author:
- Holger Eichelberger, SSE
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSimpleStartStopServiceManagerTest.ConfigConfigures the context, in particular through instances that are not loaded automatically by Spring in tests.static classSimpleStartStopServiceManagerTest.InitializerInitializes/modifies the spring setup.-
Nested classes/interfaces inherited from class test.de.iip_ecosphere.platform.services.spring.AbstractTestServiceManager
AbstractTestServiceManager.ArtifactAsserter, AbstractTestServiceManager.ServiceImpl
-
-
Field Summary
Fields Modifier and Type Field Description private static de.iip_ecosphere.platform.support.ServerAddressBROKER-
Fields inherited from class test.de.iip_ecosphere.platform.services.spring.AbstractTestServiceManager
POSITIVE_GAUGE_VALUE
-
-
Constructor Summary
Constructors Constructor Description SimpleStartStopServiceManagerTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidinit()Initializes the test by starting an embedded AMQP server.static voidshutdown()Shuts down client and test server.voidtestSetup()Tests known/default values in setup.voidtestSimpleStartStop()Tests a simple start-stop cycle of theSpringCloudServiceManagerwith two processes.-
Methods inherited from class test.de.iip_ecosphere.platform.services.spring.AbstractTestServiceManager
assertFileExists, assertMetrics, assertReceiverLog, doTestStartStop, getConfig, init, releaseFakeServiceCommandServers, startFakeServiceCommandServers, testWithZipArchive
-
-
-
-
Method Detail
-
init
public static void init()
Initializes the test by starting an embedded AMQP server. Requires the Qpid configuration file in src/test. We do not rely on MQTT here, because Moquette is not stable enough and Hivemq requires JDK 11.
-
shutdown
public static void shutdown()
Shuts down client and test server.
-
testSimpleStartStop
public void testSimpleStartStop() throws java.util.concurrent.ExecutionException, java.io.IOExceptionTests a simple start-stop cycle of theSpringCloudServiceManagerwith two processes. This test requires an actual version oftest.simpleStream.springintarget/jars- Maven downloads the artifact in the compile phase.- Throws:
java.util.concurrent.ExecutionException- shall not occur for successful testjava.io.IOException- shall not occur for successful test
-
testSetup
public void testSetup()
Tests known/default values in setup.
-
-