Class EnsembleStartStopServiceManagerTest
java.lang.Object
test.de.iip_ecosphere.platform.services.spring.AbstractTest
test.de.iip_ecosphere.platform.services.spring.AbstractTestServiceManager
test.de.iip_ecosphere.platform.services.spring.EnsembleStartStopServiceManagerTest
@SpringBootTest(classes=Config.class)
@TestPropertySource(locations="classpath:iipecosphere.yml")
@ContextConfiguration(initializers=Initializer.class)
@Import(de.iip_ecosphere.platform.services.spring.SpringCloudServiceSetup.class)
public class EnsembleStartStopServiceManagerTest
extends AbstractTestServiceManager
Tests
SpringCloudServiceManager. We assume that the test artifacts are prepared for MQTT v3.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfigures the context, in particular through instances that are not loaded automatically by Spring in tests.static classInitializes/modifies the spring setup.Nested classes/interfaces inherited from class test.de.iip_ecosphere.platform.services.spring.AbstractTestServiceManager
AbstractTestServiceManager.ArtifactAsserter, AbstractTestServiceManager.ServiceImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final de.iip_ecosphere.platform.support.ServerAddressFields inherited from class test.de.iip_ecosphere.platform.services.spring.AbstractTestServiceManager
POSITIVE_GAUGE_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit()Initializes the test by starting an embedded AMQP server.static voidshutdown()Shuts down client and test server.voidTests a simple start-stop cycle of theSpringCloudServiceManagerin one process as an ensemble.voidTests a simple start-stop cycle of theSpringCloudServiceManagerin one process as an ensemble with start options.Methods inherited from class test.de.iip_ecosphere.platform.services.spring.AbstractTestServiceManager
assertFileExists, assertMetrics, assertReceiverLog, doTestStartStop, doTestStartStop, getConfig, init, initialize, releaseFakeServiceCommandServers, startFakeServiceCommandServers, testWithZipArchive
-
Field Details
-
BROKER
private static final de.iip_ecosphere.platform.support.ServerAddress BROKER
-
-
Constructor Details
-
EnsembleStartStopServiceManagerTest
public EnsembleStartStopServiceManagerTest()
-
-
Method Details
-
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. -
testEnsembleStartStop
Tests a simple start-stop cycle of theSpringCloudServiceManagerin one process as an ensemble.- Throws:
ExecutionException- shall not occur for successful testIOException- shall not occur for successful test
-
testEnsembleStartStopOptions
Tests a simple start-stop cycle of theSpringCloudServiceManagerin one process as an ensemble with start options. The test uses appId/appInstanceId service names and relies on the internal mapping between simple and complex service names as it would be set up through the CLI/platform operations.- Throws:
ExecutionException- shall not occur for successful testIOException- shall not occur for successful test
-