Class 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
Tests SpringCloudServiceManager. We assume that the test artifacts are prepared for MQTT v3.
Author:
Holger Eichelberger, SSE
  • Field Details

    • BROKER

      private static final de.iip_ecosphere.platform.support.ServerAddress BROKER
    • APPID_ADAPTER

      private static final Function<String,String> APPID_ADAPTER
  • Constructor Details

    • SimpleStartStopServiceManagerTest

      public SimpleStartStopServiceManagerTest()
  • 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.
    • testSimpleStartStop

      public void testSimpleStartStop() throws ExecutionException, IOException
      Tests a simple start-stop cycle of the SpringCloudServiceManager with two processes. This test requires an actual version of test.simpleStream.spring in target/jars. Maven downloads the artifact in the compile phase.
      Throws:
      ExecutionException - shall not occur for successful test
      IOException - shall not occur for successful test
    • testSimpleStartStopAppId

      public void testSimpleStartStopAppId() throws ExecutionException, IOException
      Tests a simple start-stop cycle of the SpringCloudServiceManager with two processes and a given app/instance id. This test requires an actual version of test.simpleStream.spring in target/jars. Maven downloads the artifact in the compile phase.
      Throws:
      ExecutionException - shall not occur for successful test
      IOException - shall not occur for successful test
    • testSetup

      public void testSetup()
      Tests known/default values in setup.