Skip to content

Commit

Permalink
Move StorageService initialization to RowCacheTest.beforeTest
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloricardomg committed Dec 13, 2024
1 parent 4c66d9a commit a26d45c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/unit/org/apache/cassandra/db/RowCacheTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class RowCacheTest
private static final String CF_CACHEDNOCLUSTER = "CachedNoClustering";

@BeforeClass
public static void defineSchema() throws ConfigurationException
public static void beforeTest() throws ConfigurationException
{
TEST_ORG_CAFFINITAS_OHC_SEGMENTCOUNT.setInt(16);
SchemaLoader.prepareServer();
Expand All @@ -76,6 +76,7 @@ public static void defineSchema() throws ConfigurationException
SchemaLoader.standardCFMD(KEYSPACE_CACHED, CF_CACHED).caching(CachingParams.CACHE_EVERYTHING),
SchemaLoader.standardCFMD(KEYSPACE_CACHED, CF_CACHEDINT, 1, IntegerType.instance)
.caching(new CachingParams(true, 100)));
StorageService.instance.initServer(0);
}

@AfterClass
Expand Down Expand Up @@ -292,7 +293,6 @@ public void testRowCacheLoad() throws Exception
@Test
public void testRowCacheCleanup() throws Exception
{
StorageService.instance.initServer(0);
CacheService.instance.setRowCacheCapacityInMB(1);
rowCacheLoad(100, Integer.MAX_VALUE, 1000);

Expand All @@ -314,7 +314,6 @@ public void testRowCacheCleanup() throws Exception
@Test
public void testInvalidateRowCache() throws Exception
{
StorageService.instance.initServer(0);
CacheService.instance.setRowCacheCapacityInMB(1);
rowCacheLoad(100, Integer.MAX_VALUE, 1000);

Expand Down

0 comments on commit a26d45c

Please sign in to comment.