Class ServiceLogsStreamingRunner

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.Extension

    public class ServiceLogsStreamingRunner
    extends Object
    implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
    Implements BeforeAllCallback in order to provide the logic to retrieve the Service Logs Streaming configurations and activating concrete ServiceLogs instances. Workflow:
    • Check whether the SERVICE_LOGS_STREAMING_PROPERTY_ENABLED is set and apply a configuration that will enable Service Logs Streaming for all the test classes in such a case
    • If SERVICE_LOGS_STREAMING_PROPERTY_ENABLED is not set, then check whether the SERVICE_LOGS_STREAMING_PROPERTY_CONFIG is set
    • If the SERVICE_LOGS_STREAMING_PROPERTY_CONFIG is set, create an SystemPropertyBasedServiceLogsConfigurations instance for the property value and store it for the current execution context
    • If the SERVICE_LOGS_STREAMING_PROPERTY_CONFIG is not set as well, create a AnnotationBasedServiceLogsConfigurations and store it for the current execution context
    • Extract a unique ServiceLogsSettings instance out of the relevant Service Logs Streaming configurations, for it to be used by the current execution context test class
    • Create a PodLogs instance that implements the ServiceLogs interface for a k8s based Cloud environment
    • <
    • Call ServiceLogs.start() to start the PodLogs for the current execution context test class
    • Constructor Detail

      • ServiceLogsStreamingRunner

        public ServiceLogsStreamingRunner()
    • Method Detail

      • beforeAll

        public void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
      • afterAll

        public void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback