Package zipkin2.storage
Class ITSpanStore<T extends StorageComponent>
java.lang.Object
zipkin2.storage.ITStorage<T>
zipkin2.storage.ITSpanStore<T>
Base test for
SpanStore.
Subtypes should create a connection to a real backend, even if that backend is in-process.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis would only happen when the store layer is bootstrapping, or has been purged.protected voidThis is unlikely and means instrumentation sends empty spans by mistake.protected final voidConfigures aStorageComponent.Builderwith parameters for the test being executed.protected voidconsumer_implementsCall_execute(org.junit.jupiter.api.TestInfo testInfo) protected voidconsumer_implementsCall_submit(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_absentWhenNoTimestamp(org.junit.jupiter.api.TestInfo testInfo) Spans and traces are meaningless unless they have a timestamp.protected voidgetTraces_annotation(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_considersBitsAbove64bit(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_differentiateOnServiceName(org.junit.jupiter.api.TestInfo testInfo) This test makes sure that annotation queries pay attention to which host recorded dataprotected voidgetTraces_differentiatesDebugFromShared(org.junit.jupiter.api.TestInfo testInfo) Prevents subtle bugs which can result in mixed-length traces from linking.protected voidgetTraces_duration(org.junit.jupiter.api.TestInfo testInfo) Shows that duration queries go against the root span, not the childprotected voidgetTraces_endTsAndLookback(org.junit.jupiter.api.TestInfo testInfo) Traces whose root span has timestamps between (endTs - lookback) and endTs are returnedprotected voidgetTraces_endTsInsideTheTrace(org.junit.jupiter.api.TestInfo testInfo) Ensure complete traces are aggregated, even if they complete after endTsprotected voidgetTraces_filteringMatchesMostRecentTraces(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_groupsTracesTogether(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_lateDuration(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_limit(org.junit.jupiter.api.TestInfo testInfo) limit should apply to traces closest to endTsprotected voidgetTraces_maxDuration(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_minDuration(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_multipleAnnotationsBecomeAndFilter(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_serviceNames(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_serviceNames_mixedTraceIdLength(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_spanName(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_spanName_mixedTraceIdLength(org.junit.jupiter.api.TestInfo testInfo) protected voidgetTraces_tags(org.junit.jupiter.api.TestInfo testInfo) protected voidnames_goLowercase(org.junit.jupiter.api.TestInfo testInfo) protected voidreadback_minimalErrorSpan(org.junit.jupiter.api.TestInfo testInfo) The following skeletal span is used in dependency linking.protected voidreadsBackLargeValues(org.junit.jupiter.api.TestInfo testInfo) While large spans are discouraged, and maybe not indexed, we should be able to read them back.protected voidspanWithProblematicData(org.junit.jupiter.api.TestInfo testInfo) This tests problematic data that can sometimes break storage: json in span name tag with nested dots (can be confused as nested objects)Methods inherited from class zipkin2.storage.ITStorage
accept, accept, assertGetTraceReturns, assertGetTraceReturns, assertGetTraceReturnsEmpty, assertGetTracesReturns, assertGetTracesReturns, assertGetTracesReturnsCount, assertGetTracesReturnsEmpty, assertGetTracesReturnsEmpty, blockWhileInFlight, checkStorage, clear, initializeStoragePerTest, names, newStorageBuilder, requestBuilder, returnsRawSpans, sortTrace, store, testSuffix, traces
-
Constructor Details
-
ITSpanStore
public ITSpanStore()
-
-
Method Details
-
configureStorageForTest
Description copied from class:ITStorageConfigures aStorageComponent.Builderwith parameters for the test being executed.- Specified by:
configureStorageForTestin classITStorage<T extends StorageComponent>
-
allShouldWorkWhenEmpty
This would only happen when the store layer is bootstrapping, or has been purged.- Throws:
Exception
-
allShouldWorkWhenNoIndexableDataYet
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
- Throws:
Exception
-
getTraces_spanName_mixedTraceIdLength
@Test protected void getTraces_spanName_mixedTraceIdLength(org.junit.jupiter.api.TestInfo testInfo) throws Exception - Throws:
Exception
-
getTraces_tags
- 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
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
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_annotation
- 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
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
- 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
-