this.cmr = new CassandraMetadataRepository( factories, null, cassandraArchivaManager );
this.repository = this.cmr;
- clearReposAndNamespace();
+ clearReposAndNamespace( cassandraArchivaManager );
}
/**
public void shutdown()
throws Exception
{
- clearReposAndNamespace();
+ clearReposAndNamespace( cassandraArchivaManager );
super.tearDown();
}
- protected void clearReposAndNamespace()
+ static void clearReposAndNamespace( CassandraArchivaManager cassandraArchivaManager )
throws Exception
{
cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
{
cassandraArchivaManager.start();
}
- clearReposAndNamespace();
+ CassandraMetadataRepositoryTest.clearReposAndNamespace( cassandraArchivaManager );
}
@After
public void shutdown()
throws Exception
{
- clearReposAndNamespace();
+ CassandraMetadataRepositoryTest.clearReposAndNamespace( cassandraArchivaManager );
cassandraArchivaManager.shutdown();
}
}
finally
{
- clearReposAndNamespace();
+ CassandraMetadataRepositoryTest.clearReposAndNamespace( cassandraArchivaManager );
}
}
-
- protected void clearReposAndNamespace()
- throws Exception
- {
- cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
- "project" );
- cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
- "namespace" );
- cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
- "repository" );
- }
}