Class HttpServerTimingInstrumentationVerificationTests

java.lang.Object
io.micrometer.core.instrument.HttpServerTimingInstrumentationVerificationTests

@Incubating(since="1.8.9") public abstract class HttpServerTimingInstrumentationVerificationTests extends Object
Verify the instrumentation of an HTTP server has the minimum expected results. See startInstrumentedServer() for the required specification the instrumented HTTP server must handle.
  • Constructor Details

    • HttpServerTimingInstrumentationVerificationTests

      public HttpServerTimingInstrumentationVerificationTests()
  • Method Details

    • timerName

      protected String timerName()
      A default is provided that should be preferred by new instrumentations. Existing instrumentations that use a different value to maintain backwards compatibility may override this method to run tests with a different name used in assertions.
      Returns:
      name of the meter timing http server requests
    • startInstrumentedServer

      protected abstract URI startInstrumentedServer() throws Exception
      Start the instrumented HTTP server to be tested. No request body or query parameters will be sent, and any response body will be ignored. The server MUST serve the routes described by HttpServerTimingInstrumentationVerificationTests.InstrumentedRoutes. Constants are available in that class for the routes that will have requests sent to them as part of the TCK. The server MUST NOT have a route for the following:
      • GET /notFound (returns 404 response)
      Returns:
      base URI where the instrumented server is receiving requests. Must end with a slash (/).
      Throws:
      Exception
      See Also:
    • stopInstrumentedServer

      protected abstract void stopInstrumentedServer() throws Exception
      Stop the instrumented server that was started with startInstrumentedServer().
      Throws:
      Exception
    • getRegistry

      protected io.micrometer.core.instrument.MeterRegistry getRegistry()
      MeterRegistry to use for instrumentation verification tests.
      Returns:
      registry to use