Package zipkin2.storage
Class ITSpanStore<T extends StorageComponent>
java.lang.Object
zipkin2.storage.ITStorage<T>
zipkin2.storage.ITSpanStore<T>
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.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ITSpanStore() -
Method Summary
Modifier and Type Method Description protected voidallShouldWorkWhenEmpty()This would only happen when the store layer is bootstrapping, or has been purged.protected voidallShouldWorkWhenNoIndexableDataYet()This is unlikely and means instrumentation sends empty spans by mistake.protected voidconfigureStorageForTest(StorageComponent.Builder storage)Configures aStorageComponent.Builderwith parameters for the test being executed.protected voidconsumer_properlyImplementsCallContract_execute()protected voidconsumer_properlyImplementsCallContract_submit()protected voidgetTraces_absentWhenNoTimestamp()Spans and traces are meaningless unless they have a timestamp.protected voidgetTraces_annotation()protected voidgetTraces_considersBitsAbove64bit()protected voidgetTraces_differentiateOnServiceName()This test makes sure that annotation queries pay attention to which host recorded dataprotected voidgetTraces_duration()Shows that duration queries go against the root span, not the childprotected voidgetTraces_endTsAndLookback()Traces whose root span has timestamps between (endTs - lookback) and endTs are returnedprotected voidgetTraces_endTsInsideTheTrace()Ensure complete traces are aggregated, even if they complete after endTsprotected voidgetTraces_filteringMatchesMostRecentTraces()protected voidgetTraces_groupsTracesTogether()protected voidgetTraces_lateDuration()protected voidgetTraces_limit()limit should apply to traces closest to endTsprotected voidgetTraces_manyTraces()Formerly, a bug was present where cassandra didn't index more than bucket count traces per millisecond.protected voidgetTraces_maxDuration()protected voidgetTraces_minDuration()protected voidgetTraces_multipleAnnotationsBecomeAndFilter()protected voidgetTraces_serviceNames()protected voidgetTraces_serviceNames_mixedTraceIdLength()protected voidgetTraces_spanName()protected voidgetTraces_spanName_mixedTraceIdLength()protected voidgetTraces_tags()protected voidnames_goLowercase()protected voidreadback_minimalErrorSpan()The following skeletal span is used in dependency linking.protected voidreadsBackLargeValues()While large spans are discouraged, and maybe not indexed, we should be able to read them back.protected static QueryRequest.BuilderrequestBuilder()protected voidspanWithProblematicData()This tests problematic data that can sometimes break storage: json in span name tag with nested dots (can be confused as nested objects)protected voidtraceWithManySpans()Methods inherited from class zipkin2.storage.ITStorage
accept, accept, blockWhileInFlight, clear, initializeStoragePerTest, names, newStorageBuilder, store, 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:
IOException
-
allShouldWorkWhenNoIndexableDataYet
This is unlikely and means instrumentation sends empty spans by mistake.- Throws:
IOException
-
consumer_properlyImplementsCallContract_execute
- Throws:
IOException
-
consumer_properlyImplementsCallContract_submit
- Throws:
Exception
-
getTraces_groupsTracesTogether
- Throws:
IOException
-
getTraces_considersBitsAbove64bit
- Throws:
IOException
-
getTraces_filteringMatchesMostRecentTraces
- Throws:
Exception
-
getTraces_serviceNames
- Throws:
Exception
-
getTraces_serviceNames_mixedTraceIdLength
- Throws:
Exception
-
getTraces_spanName
- Throws:
Exception
-
getTraces_spanName_mixedTraceIdLength
- Throws:
Exception
-
getTraces_tags
- Throws:
Exception
-
getTraces_minDuration
- Throws:
Exception
-
getTraces_lateDuration
- Throws:
Exception
-
getTraces_maxDuration
- Throws:
Exception
-
readback_minimalErrorSpan
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:
IOException
-
spanWithProblematicData
This tests problematic data that can sometimes break storage:- json in span name
- tag with nested dots (can be confused as nested objects)
- Throws:
IOException
-
getTraces_manyTraces
Formerly, a bug was present where cassandra didn't index more than bucket count traces per millisecond. This stores a lot of spans to ensure indexes work under high-traffic scenarios.- Throws:
IOException
-
getTraces_duration
Shows that duration queries go against the root span, not the child- Throws:
IOException
-
getTraces_absentWhenNoTimestamp
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:
IOException
-
getTraces_annotation
- Throws:
IOException
-
getTraces_multipleAnnotationsBecomeAndFilter
- Throws:
IOException
-
getTraces_differentiateOnServiceName
This test makes sure that annotation queries pay attention to which host recorded data- Throws:
IOException
-
getTraces_limit
limit should apply to traces closest to endTs- Throws:
IOException
-
getTraces_endTsAndLookback
Traces whose root span has timestamps between (endTs - lookback) and endTs are returned- Throws:
IOException
-
traceWithManySpans
- Throws:
IOException
-
names_goLowercase
- Throws:
IOException
-
getTraces_endTsInsideTheTrace
Ensure complete traces are aggregated, even if they complete after endTs- Throws:
IOException
-
requestBuilder
-