From 655a666ba90d8dc1d853144584eb625e125744da Mon Sep 17 00:00:00 2001 From: Mahad Zaryab Date: Fri, 8 Nov 2024 20:57:28 -0500 Subject: [PATCH] Fix Cassandra Archive Integration Test Signed-off-by: Mahad Zaryab --- plugin/storage/integration/cassandra_test.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/plugin/storage/integration/cassandra_test.go b/plugin/storage/integration/cassandra_test.go index 9e4f477b0b3..2715b002c58 100644 --- a/plugin/storage/integration/cassandra_test.go +++ b/plugin/storage/integration/cassandra_test.go @@ -21,7 +21,8 @@ import ( type CassandraStorageIntegration struct { StorageIntegration - factory *cassandra.Factory + factory *cassandra.Factory + archiveFactory *cassandra.Factory } func newCassandraStorageIntegration() *CassandraStorageIntegration { @@ -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 { @@ -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)