Interface TestResourcesConfiguration

All Superinterfaces:
io.micronaut.testresources.buildtools.KnownModules

public interface TestResourcesConfiguration extends io.micronaut.testresources.buildtools.KnownModules
Configuration for the test resources plugin.
  • Field Summary

    Fields inherited from interface io.micronaut.testresources.buildtools.KnownModules

    BOM, CLIENT, CONTROL_PANEL, CORE, ELASTICSEARCH, EMBEDDED, EXTENSIONS_CORE, EXTENSIONS_JUNIT_PLATFORM, HASHICORP_CONSUL, HASHICORP_VAULT, HIBERNATE_REACTIVE_CORE, HIBERNATE_REACTIVE_MARIADB, HIBERNATE_REACTIVE_MSSQL, HIBERNATE_REACTIVE_MYSQL, HIBERNATE_REACTIVE_ORACLE_FREE, HIBERNATE_REACTIVE_ORACLE_XE, HIBERNATE_REACTIVE_POSTGRESQL, HIVEMQ, JDBC_CORE, JDBC_MARIADB, JDBC_MSSQL, JDBC_MYSQL, JDBC_ORACLE_FREE, JDBC_ORACLE_XE, JDBC_POSTGRESQL, KAFKA, LOCALSTACK_CORE, LOCALSTACK_DYNAMODB, LOCALSTACK_S3, LOCALSTACK_SNS, LOCALSTACK_SQS, MONGODB, NEO4J, OPENSEARCH, R2DBC_CORE, R2DBC_MARIADB, R2DBC_MSSQL, R2DBC_MYSQL, R2DBC_ORACLE_FREE, R2DBC_ORACLE_XE, R2DBC_POOL, R2DBC_POSTGRESQL, RABBITMQ, REDIS, SERVER, TESTCONTAINERS
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.provider.ListProperty<String>
    Additional modules to include on the test resources classpath.
    org.gradle.api.provider.Property<Integer>
    Configures the maximum amount of time to wait for the server to start a test resource.
    org.gradle.api.provider.Property<Boolean>
    If set to false, test resources support will be disabled.
    org.gradle.api.provider.Property<Integer>
    If set, then the test resources server will be started using the specified port.
    org.gradle.api.provider.Property<Boolean>
    If set to false, then the plugin will not try to infer the test resources modules to include by inspecting the project dependencies: instead the user will need to add all modules explicitly.
    org.gradle.api.provider.Property<Integer>
    Server idle timeout, in minutes.
    org.gradle.api.provider.Property<Boolean>
    When set to true, then the server will be shared between independent builds (e.g.
    org.gradle.api.provider.Property<String>
    Allows configuring a namespace for the shared test resources server.
    org.gradle.api.provider.Property<String>
    The version of the Micronaut Test Resources library to use.
  • Method Details

    • getEnabled

      org.gradle.api.provider.Property<Boolean> getEnabled()
      If set to false, test resources support will be disabled.
      Returns:
      the enabled property
    • getVersion

      org.gradle.api.provider.Property<String> getVersion()
      The version of the Micronaut Test Resources library to use. Defaults to the version embedded in the Gradle plugin.
      Returns:
      the version of the Micronaut Test Resources library
    • getExplicitPort

      org.gradle.api.provider.Property<Integer> getExplicitPort()
      If set, then the test resources server will be started using the specified port. If a server already exists on the port, then the build will reuse that server, effectively ignoring the existing configuration. This can be used to share a server between multiple independent builds.

      If an explicit port is set, then security is lowered and a token is no longer requested. Any client from the loopback address can access the server.

      Returns:
      the explicit port to use
    • getInferClasspath

      org.gradle.api.provider.Property<Boolean> getInferClasspath()
      If set to false, then the plugin will not try to infer the test resources modules to include by inspecting the project dependencies: instead the user will need to add all modules explicitly.
      Returns:
      the infer classpath property
    • getAdditionalModules

      org.gradle.api.provider.ListProperty<String> getAdditionalModules()
      Additional modules to include on the test resources classpath. For example, if you add "kafka" to this list, then the "micronaut-test-resources-kafka" module will automatically be added to the test resources classpath.
    • getClientTimeout

      org.gradle.api.provider.Property<Integer> getClientTimeout()
      Configures the maximum amount of time to wait for the server to start a test resource. Some containers may take a long amount of time to start with slow internet connections. Defaults to 60.
      Returns:
      the client timeout in seconds
    • getSharedServer

      org.gradle.api.provider.Property<Boolean> getSharedServer()
      When set to true, then the server will be shared between independent builds (e.g. two different projects built in separate checkout directories).
      Returns:
      the shared server property
    • getSharedServerNamespace

      org.gradle.api.provider.Property<String> getSharedServerNamespace()
      Allows configuring a namespace for the shared test resources server. This can be used in case it makes sense to have different instances of shared services, for example when independent builds sets share different services.
      Returns:
      the namespace
    • getServerIdleTimeoutMinutes

      org.gradle.api.provider.Property<Integer> getServerIdleTimeoutMinutes()
      Server idle timeout, in minutes. If the server doesn't receive any request for this amount of time, it will stop itself.
      Returns:
      the server idle timeout