diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePdsDataRegionMetricsTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePdsDataRegionMetricsTxTest.java index 0085d2e3ecee..09b1213737fe 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePdsDataRegionMetricsTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePdsDataRegionMetricsTxTest.java @@ -19,6 +19,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.persistence.db.IgnitePdsDataRegionMetricsTest; import org.apache.ignite.testframework.MvccFeatureChecker; import org.junit.Ignore; @@ -32,17 +33,14 @@ @RunWith(JUnit4.class) public class IgnitePdsDataRegionMetricsTxTest extends IgnitePdsDataRegionMetricsTest { /** {@inheritDoc} */ - @Override protected CacheConfiguration<Object, Object> cacheConfiguration() { - return super.cacheConfiguration().setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); + @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { + return super.getConfiguration(igniteInstanceName) + .setMvccVacuumFrequency(Long.MAX_VALUE); } /** {@inheritDoc} */ - @Test - @Override public void testMemoryUsageSingleNode() throws Exception { - if (MvccFeatureChecker.forcedMvcc()) - fail("https://issues.apache.org/jira/browse/IGNITE-10591"); - - super.testMemoryUsageSingleNode(); + @Override protected CacheConfiguration<Object, Object> cacheConfiguration() { + return super.cacheConfiguration().setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); } /** {@inheritDoc} */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java index 235676c7c126..0f0bc6489124 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsDataRegionMetricsTest.java @@ -53,6 +53,7 @@ import static java.nio.file.Files.newDirectoryStream; import static org.apache.ignite.configuration.DataStorageConfiguration.DFLT_DATA_REG_DEFAULT_NAME; import static org.apache.ignite.internal.processors.cache.GridCacheUtils.UTILITY_CACHE_NAME; +import static org.apache.ignite.internal.processors.cache.mvcc.txlog.TxLog.TX_LOG_CACHE_NAME; import static org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager.META_STORAGE_NAME; import static org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_ID; import static org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage.METASTORAGE_CACHE_NAME; @@ -156,7 +157,7 @@ public void testMemoryUsageSingleNode() throws Exception { cache.putAll(map); - forceCheckpoint(); + forceCheckpoint(node); checkMetricsConsistency(node); } @@ -307,6 +308,7 @@ private static DataRegionMetrics getDfltRegionMetrics(Ignite node) { private void checkMetricsConsistency(final IgniteEx node) throws Exception { checkMetricsConsistency(node, DEFAULT_CACHE_NAME); checkMetricsConsistency(node, UTILITY_CACHE_NAME); + checkMetricsConsistency(node, TX_LOG_CACHE_NAME); checkMetricsConsistency(node, METASTORAGE_CACHE_NAME); } @@ -317,8 +319,10 @@ private void checkMetricsConsistency(final IgniteEx node, String cacheName) thro assert pageStoreMgr != null : "Persistence is not enabled"; boolean metaStore = METASTORAGE_CACHE_NAME.equals(cacheName); + boolean txLog = TX_LOG_CACHE_NAME.equals(cacheName); File cacheWorkDir = metaStore ? new File(pageStoreMgr.workDir(), META_STORAGE_NAME) : + txLog ? new File(pageStoreMgr.workDir(), TX_LOG_CACHE_NAME) : pageStoreMgr.cacheWorkDir(node.cachex(cacheName).configuration()); long totalPersistenceSize = 0; @@ -345,6 +349,7 @@ private void checkMetricsConsistency(final IgniteEx node, String cacheName) thro GridCacheSharedContext cctx = node.context().cache().context(); String regionName = metaStore ? GridCacheDatabaseSharedManager.METASTORE_DATA_REGION_NAME : + txLog ? TX_LOG_CACHE_NAME : cctx.cacheContext(CU.cacheId(cacheName)).group().dataRegion().config().getName(); long totalAllocatedPagesFromMetrics = cctx.database().memoryMetrics(regionName).getTotalAllocatedPages();
With regards, Apache Git Services