diff --git a/plugin/storage/integration/badgerstore_test.go b/plugin/storage/integration/badgerstore_test.go index 6bec5b45365..29d68edd4cd 100644 --- a/plugin/storage/integration/badgerstore_test.go +++ b/plugin/storage/integration/badgerstore_test.go @@ -14,6 +14,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/metrics" "github.com/jaegertracing/jaeger/pkg/testutils" "github.com/jaegertracing/jaeger/plugin/storage/badger" + "github.com/jaegertracing/jaeger/storage_v2/v1adapter" ) type BadgerIntegrationStorage struct { @@ -35,9 +36,10 @@ func (s *BadgerIntegrationStorage) initialize(t *testing.T) { s.SpanWriter, err = s.factory.CreateSpanWriter() require.NoError(t, err) - s.SpanReader, err = s.factory.CreateSpanReader() + spanReader, err := s.factory.CreateSpanReader() require.NoError(t, err) - + s.TraceReader = v1adapter.NewTraceReader(spanReader) + s.SamplingStore, err = s.factory.CreateSamplingStore(0) require.NoError(t, err) } diff --git a/plugin/storage/integration/cassandra_test.go b/plugin/storage/integration/cassandra_test.go index 41d67c94544..559529498d9 100644 --- a/plugin/storage/integration/cassandra_test.go +++ b/plugin/storage/integration/cassandra_test.go @@ -19,6 +19,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/testutils" "github.com/jaegertracing/jaeger/plugin/storage/cassandra" "github.com/jaegertracing/jaeger/storage/dependencystore" + "github.com/jaegertracing/jaeger/storage_v2/v1adapter" ) type CassandraStorageIntegration struct { @@ -74,8 +75,9 @@ func (s *CassandraStorageIntegration) initializeCassandra(t *testing.T) { var err error s.SpanWriter, err = f.CreateSpanWriter() require.NoError(t, err) - s.SpanReader, err = f.CreateSpanReader() + spanReader, err := f.CreateSpanReader() require.NoError(t, err) + s.TraceReader = v1adapter.NewTraceReader(spanReader) s.ArchiveSpanReader, err = f.CreateArchiveSpanReader() require.NoError(t, err) s.ArchiveSpanWriter, err = f.CreateArchiveSpanWriter() diff --git a/plugin/storage/integration/elasticsearch_test.go b/plugin/storage/integration/elasticsearch_test.go index cd5cfe47464..5bc8ea02b16 100644 --- a/plugin/storage/integration/elasticsearch_test.go +++ b/plugin/storage/integration/elasticsearch_test.go @@ -26,6 +26,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/testutils" "github.com/jaegertracing/jaeger/plugin/storage/es" "github.com/jaegertracing/jaeger/storage/dependencystore" + "github.com/jaegertracing/jaeger/storage_v2/v1adapter" ) const ( @@ -134,8 +135,9 @@ func (s *ESStorageIntegration) initSpanstore(t *testing.T, allTagsAsFields bool) var err error s.SpanWriter, err = f.CreateSpanWriter() require.NoError(t, err) - s.SpanReader, err = f.CreateSpanReader() + spanReader, err := f.CreateSpanReader() require.NoError(t, err) + s.TraceReader = v1adapter.NewTraceReader(spanReader) s.ArchiveSpanReader, err = f.CreateArchiveSpanReader() require.NoError(t, err) s.ArchiveSpanWriter, err = f.CreateArchiveSpanWriter() diff --git a/plugin/storage/integration/grpc_test.go b/plugin/storage/integration/grpc_test.go index 8ca6df51ddb..17e58887a1b 100644 --- a/plugin/storage/integration/grpc_test.go +++ b/plugin/storage/integration/grpc_test.go @@ -15,6 +15,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/metrics" "github.com/jaegertracing/jaeger/pkg/testutils" "github.com/jaegertracing/jaeger/plugin/storage/grpc" + "github.com/jaegertracing/jaeger/storage_v2/v1adapter" ) type GRPCStorageIntegrationTestSuite struct { @@ -38,8 +39,9 @@ func (s *GRPCStorageIntegrationTestSuite) initialize(t *testing.T) { s.SpanWriter, err = f.CreateSpanWriter() require.NoError(t, err) - s.SpanReader, err = f.CreateSpanReader() + spanReader, err := f.CreateSpanReader() require.NoError(t, err) + s.TraceReader = v1adapter.NewTraceReader(spanReader) s.ArchiveSpanReader, err = f.CreateArchiveSpanReader() require.NoError(t, err) s.ArchiveSpanWriter, err = f.CreateArchiveSpanWriter() diff --git a/plugin/storage/integration/kafka_test.go b/plugin/storage/integration/kafka_test.go index 24b2131993d..2b42773ca4a 100644 --- a/plugin/storage/integration/kafka_test.go +++ b/plugin/storage/integration/kafka_test.go @@ -25,6 +25,7 @@ import ( "github.com/jaegertracing/jaeger/plugin/storage/kafka" "github.com/jaegertracing/jaeger/plugin/storage/memory" "github.com/jaegertracing/jaeger/storage/spanstore" + "github.com/jaegertracing/jaeger/storage_v2/v1adapter" ) const defaultLocalKafkaBroker = "127.0.0.1:9092" @@ -91,7 +92,8 @@ func (s *KafkaIntegrationTestSuite) initialize(t *testing.T) { spanConsumer.Start() s.SpanWriter = spanWriter - s.SpanReader = &ingester{traceStore} + spanReader := &ingester{traceStore} + s.TraceReader = v1adapter.NewTraceReader(spanReader) s.CleanUp = func(_ *testing.T) {} s.SkipArchiveTest = true } diff --git a/plugin/storage/integration/memstore_test.go b/plugin/storage/integration/memstore_test.go index 35eaede7517..f910a2f6ed0 100644 --- a/plugin/storage/integration/memstore_test.go +++ b/plugin/storage/integration/memstore_test.go @@ -11,6 +11,7 @@ import ( "github.com/jaegertracing/jaeger/pkg/testutils" "github.com/jaegertracing/jaeger/plugin/storage/memory" + "github.com/jaegertracing/jaeger/storage_v2/v1adapter" ) type MemStorageIntegrationTestSuite struct { @@ -24,7 +25,8 @@ func (s *MemStorageIntegrationTestSuite) initialize(_ *testing.T) { store := memory.NewStore() archiveStore := memory.NewStore() s.SamplingStore = memory.NewSamplingStore(2) - s.SpanReader = store + spanReader := store + s.TraceReader = v1adapter.NewTraceReader(spanReader) s.SpanWriter = store s.ArchiveSpanReader = archiveStore s.ArchiveSpanWriter = archiveStore