Package csw.testkit

Class LocationTestKit


  • public final class LocationTestKit
    extends java.lang.Object
    LocationTestKit supports starting HTTP Location Server backed by Akka cluster and Distributed Data

    Example:

    
       private val testKit = LocationTestKit()
    
       // starting Location Server (starts location server on default ports specified in configuration file)
       testKit.startLocationServer()
    
       // stopping alarm server
       testKit.shutdownLocationServer()
    
     

    • Constructor Detail

      • LocationTestKit

        public LocationTestKit()
    • Method Detail

      • apply

        public static LocationTestKit apply​(TestKitSettings testKitSettings)
        Create a LocationTestKit

        When the test has completed you should shutdown the location server with shutdownLocationServer().

        Parameters:
        testKitSettings - (undocumented)
        Returns:
        (undocumented)
      • create

        public static LocationTestKit create()
        Java API for creating LocationTestKit

        Returns:
        handle to LocationTestKit which can be used to start and stop location server
      • create

        public static LocationTestKit create​(TestKitSettings testKitSettings)
        Java API for creating LocationTestKit

        Parameters:
        testKitSettings - custom testKitSettings
        Returns:
        handle to LocationTestKit which can be used to start and stop location server
      • timeout

        public akka.util.Timeout timeout()
      • startLocationServer

        public void startLocationServer()
        Start HTTP location server on default port 7654

        Location server is required to be running on a machine before starting components. (HCD's, Assemblies etc.)

      • shutdownLocationServer

        public void shutdownLocationServer()
        Shutdown HTTP location server

        When the test has completed, make sure you shutdown location server.