Package zipkin2.junit

Class HttpFailure


  • public final class HttpFailure
    extends java.lang.Object
    Instrumentation that use POST endpoints need to survive failures. Besides simply not starting the zipkin server, you can enqueue failures like this to test edge cases. For example, that you log a failure when a 400 code is returned.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static HttpFailure disconnectDuringBody()
      Ex a network partition occurs in the middle of the POST request
      static HttpFailure sendErrorResponse​(int code, java.lang.String body)
      Ex code 400 when the server cannot read the spans
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • disconnectDuringBody

        public static HttpFailure disconnectDuringBody()
        Ex a network partition occurs in the middle of the POST request
      • sendErrorResponse

        public static HttpFailure sendErrorResponse​(int code,
                                                    java.lang.String body)
        Ex code 400 when the server cannot read the spans