From de5869e29f1653c557f78db15ece9657b0e60bfd Mon Sep 17 00:00:00 2001 From: Vladimir Zatsepin Date: Wed, 17 Jan 2024 16:35:54 +0400 Subject: [PATCH] JT-78303: Try fix test --- .../exodus/entitystore/EntityIterableCacheTest.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/entity-store/src/test/kotlin/jetbrains/exodus/entitystore/EntityIterableCacheTest.kt b/entity-store/src/test/kotlin/jetbrains/exodus/entitystore/EntityIterableCacheTest.kt index 6908a5544..8a1010ba1 100644 --- a/entity-store/src/test/kotlin/jetbrains/exodus/entitystore/EntityIterableCacheTest.kt +++ b/entity-store/src/test/kotlin/jetbrains/exodus/entitystore/EntityIterableCacheTest.kt @@ -15,6 +15,8 @@ */ package jetbrains.exodus.entitystore +import jetbrains.exodus.entitystore.PersistentEntityStoreConfig.ENTITY_ITERABLE_CACHE_MEMORY_PERCENTAGE +import jetbrains.exodus.entitystore.PersistentEntityStoreConfig.ENTITY_ITERABLE_CACHE_SIZE import mu.KLogger import mu.KLogging import java.util.concurrent.CountDownLatch @@ -36,7 +38,8 @@ class EntityIterableCacheTest : EntityStoreTestBase() { init { // Use for local experiments to change cache params - //System.setProperty("exodus.entityStore.entityIterableCache.size", "8096") + //System.setProperty(ENTITY_ITERABLE_CACHE_SIZE, "8096") + System.setProperty(ENTITY_ITERABLE_CACHE_MEMORY_PERCENTAGE, "50") } } @@ -112,7 +115,7 @@ class EntityIterableCacheTest : EntityStoreTestBase() { // Then reportInLogEntityIterableCacheStats() val actualHitRate = store.entityIterableCache.stats.hitRate - val expectedHitRate = 0.6 + val expectedHitRate = 0.8 println("Actual hitRate: $actualHitRate") assertTrue( "hitRate should be more or equal to $expectedHitRate, but was $actualHitRate",