Class ITSpanStore<T extends StorageComponent>


  • public abstract class ITSpanStore<T extends StorageComponent>
    extends ITStorage<T>
    Base test for SpanStore.

    Subtypes should create a connection to a real backend, even if that backend is in-process.

    • Constructor Detail

      • ITSpanStore

        public ITSpanStore()
    • Method Detail

      • allShouldWorkWhenEmpty

        @Test
        protected void allShouldWorkWhenEmpty()
                                       throws Exception
        This would only happen when the store layer is bootstrapping, or has been purged.
        Throws:
        Exception
      • allShouldWorkWhenNoIndexableDataYet

        @Test
        protected void allShouldWorkWhenNoIndexableDataYet()
                                                    throws Exception
        This is unlikely and means instrumentation sends empty spans by mistake.
        Throws:
        Exception
      • consumer_implementsCall_execute

        @Test
        protected void consumer_implementsCall_execute​(org.junit.jupiter.api.TestInfo testInfo)
                                                throws Exception
        Throws:
        Exception
      • consumer_implementsCall_submit

        @Test
        protected void consumer_implementsCall_submit​(org.junit.jupiter.api.TestInfo testInfo)
                                               throws Exception
        Throws:
        Exception
      • getTraces_groupsTracesTogether

        @Test
        protected void getTraces_groupsTracesTogether​(org.junit.jupiter.api.TestInfo testInfo)
                                               throws Exception
        Throws:
        Exception
      • getTraces_considersBitsAbove64bit

        @Test
        protected void getTraces_considersBitsAbove64bit​(org.junit.jupiter.api.TestInfo testInfo)
                                                  throws Exception
        Throws:
        Exception
      • getTraces_filteringMatchesMostRecentTraces

        @Test
        protected void getTraces_filteringMatchesMostRecentTraces​(org.junit.jupiter.api.TestInfo testInfo)
                                                           throws Exception
        Throws:
        Exception
      • getTraces_serviceNames

        @Test
        protected void getTraces_serviceNames​(org.junit.jupiter.api.TestInfo testInfo)
                                       throws Exception
        Throws:
        Exception
      • getTraces_serviceNames_mixedTraceIdLength

        @Test
        protected void getTraces_serviceNames_mixedTraceIdLength​(org.junit.jupiter.api.TestInfo testInfo)
                                                          throws Exception
        Throws:
        Exception
      • getTraces_spanName

        @Test
        protected void getTraces_spanName​(org.junit.jupiter.api.TestInfo testInfo)
                                   throws Exception
        Throws:
        Exception
      • getTraces_spanName_mixedTraceIdLength

        @Test
        protected void getTraces_spanName_mixedTraceIdLength​(org.junit.jupiter.api.TestInfo testInfo)
                                                      throws Exception
        Throws:
        Exception
      • getTraces_tags

        @Test
        protected void getTraces_tags​(org.junit.jupiter.api.TestInfo testInfo)
                               throws Exception
        Throws:
        Exception
      • getTraces_minDuration

        @Test
        protected void getTraces_minDuration​(org.junit.jupiter.api.TestInfo testInfo)
                                      throws Exception
        Throws:
        Exception
      • getTraces_lateDuration

        @Test
        protected void getTraces_lateDuration​(org.junit.jupiter.api.TestInfo testInfo)
                                       throws Exception
        Throws:
        Exception
      • getTraces_maxDuration

        @Test
        protected void getTraces_maxDuration​(org.junit.jupiter.api.TestInfo testInfo)
                                      throws Exception
        Throws:
        Exception
      • readback_minimalErrorSpan

        @Test
        protected void readback_minimalErrorSpan​(org.junit.jupiter.api.TestInfo testInfo)
                                          throws Exception
        The following skeletal span is used in dependency linking.

        Notably this guards empty tag values work

        Throws:
        Exception
      • readsBackLargeValues

        @Test
        protected void readsBackLargeValues​(org.junit.jupiter.api.TestInfo testInfo)
                                     throws Exception
        While large spans are discouraged, and maybe not indexed, we should be able to read them back.
        Throws:
        Exception
      • spanWithProblematicData

        @Test
        protected void spanWithProblematicData​(org.junit.jupiter.api.TestInfo testInfo)
                                        throws Exception
        This tests problematic data that can sometimes break storage:
        • json in span name
        • tag with nested dots (can be confused as nested objects)
        Throws:
        Exception
      • getTraces_duration

        @Test
        protected void getTraces_duration​(org.junit.jupiter.api.TestInfo testInfo)
                                   throws Exception
        Shows that duration queries go against the root span, not the child
        Throws:
        Exception
      • getTraces_absentWhenNoTimestamp

        @Test
        protected void getTraces_absentWhenNoTimestamp​(org.junit.jupiter.api.TestInfo testInfo)
                                                throws Exception
        Spans and traces are meaningless unless they have a timestamp. While unlikely, this could happen if a binary annotation is logged before a timestamped one is.
        Throws:
        Exception
      • getTraces_differentiatesDebugFromShared

        @Test
        protected void getTraces_differentiatesDebugFromShared​(org.junit.jupiter.api.TestInfo testInfo)
                                                        throws Exception
        Prevents subtle bugs which can result in mixed-length traces from linking.
        Throws:
        Exception
      • getTraces_annotation

        @Test
        protected void getTraces_annotation​(org.junit.jupiter.api.TestInfo testInfo)
                                     throws Exception
        Throws:
        Exception
      • getTraces_multipleAnnotationsBecomeAndFilter

        @Test
        protected void getTraces_multipleAnnotationsBecomeAndFilter​(org.junit.jupiter.api.TestInfo testInfo)
                                                             throws Exception
        Throws:
        Exception
      • getTraces_differentiateOnServiceName

        @Test
        protected void getTraces_differentiateOnServiceName​(org.junit.jupiter.api.TestInfo testInfo)
                                                     throws Exception
        This test makes sure that annotation queries pay attention to which host recorded data
        Throws:
        Exception
      • getTraces_limit

        @Test
        protected void getTraces_limit​(org.junit.jupiter.api.TestInfo testInfo)
                                throws Exception
        limit should apply to traces closest to endTs
        Throws:
        Exception
      • getTraces_endTsAndLookback

        @Test
        protected void getTraces_endTsAndLookback​(org.junit.jupiter.api.TestInfo testInfo)
                                           throws Exception
        Traces whose root span has timestamps between (endTs - lookback) and endTs are returned
        Throws:
        Exception
      • names_goLowercase

        @Test
        protected void names_goLowercase​(org.junit.jupiter.api.TestInfo testInfo)
                                  throws Exception
        Throws:
        Exception
      • getTraces_endTsInsideTheTrace

        @Test
        protected void getTraces_endTsInsideTheTrace​(org.junit.jupiter.api.TestInfo testInfo)
                                              throws Exception
        Ensure complete traces are aggregated, even if they complete after endTs
        Throws:
        Exception