Skip to content

Commit

Permalink
Fix Cassandra Archive Integration Test
Browse files Browse the repository at this point in the history
Signed-off-by: Mahad Zaryab <[email protected]>
  • Loading branch information
mahadzaryab1 committed Nov 9, 2024
1 parent 7d65eb8 commit 655a666
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion plugin/storage/integration/cassandra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import (

type CassandraStorageIntegration struct {
StorageIntegration
factory *cassandra.Factory
factory *cassandra.Factory
archiveFactory *cassandra.Factory
}

func newCassandraStorageIntegration() *CassandraStorageIntegration {
Expand All @@ -38,6 +39,7 @@ func newCassandraStorageIntegration() *CassandraStorageIntegration {

func (s *CassandraStorageIntegration) cleanUp(t *testing.T) {
require.NoError(t, s.factory.Purge(context.Background()))
require.NoError(t, s.archiveFactory.Purge(context.Background()))
}

func (*CassandraStorageIntegration) initializeCassandraFactory(t *testing.T, flags []string) *cassandra.Factory {
Expand All @@ -59,12 +61,25 @@ func (s *CassandraStorageIntegration) initializeCassandra(t *testing.T) {
"--cassandra.username=" + username,
"--cassandra.keyspace=jaeger_v1_dc1",
})
af := s.initializeCassandraFactory(t, []string{
"--cassandra-archive.keyspace=jaeger_v1_dc1_archive",
"--cassandra-archive.enabled=true",
"--cassandra-archive.servers=127.0.0.1",
"--cassandra-archive.basic.allowed-authenticators=org.apache.cassandra.auth.PasswordAuthenticator",
"--cassandra-archive.password=" + password,
"--cassandra-archive.username=" + username,
})
s.factory = f
s.archiveFactory = f
var err error
s.SpanWriter, err = f.CreateSpanWriter()
require.NoError(t, err)
s.SpanReader, err = f.CreateSpanReader()
require.NoError(t, err)
s.ArchiveSpanReader, err = af.CreateSpanReader()
require.NoError(t, err)
s.ArchiveSpanWriter, err = af.CreateSpanWriter()
require.NoError(t, err)
s.SamplingStore, err = f.CreateSamplingStore(0)
require.NoError(t, err)
s.initializeDependencyReaderAndWriter(t, f)
Expand Down

0 comments on commit 655a666

Please sign in to comment.