Index: modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IndexingMultithreadedLoadContinuousRestartTest.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IndexingMultithreadedLoadContinuousRestartTest.java (revision a00089dc400b8f9830896fdc03f6e4421721515e) +++ modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IndexingMultithreadedLoadContinuousRestartTest.java (revision ) @@ -32,6 +32,7 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.processors.cache.persistence.wal.memtracker.PageMemoryTrackerPluginProvider; import org.apache.ignite.internal.visor.verify.ValidateIndexesClosure; import org.apache.ignite.internal.visor.verify.VisorValidateIndexesJobResult; import org.apache.ignite.testframework.GridTestUtils; @@ -147,51 +148,58 @@ */ @Test public void test() throws Exception { - for (int i = 0; i < RESTARTS; i++) { - IgniteEx ignite = startGrid(0); + System.setProperty(PageMemoryTrackerPluginProvider.IGNITE_ENABLE_PAGE_MEMORY_TRACKER, "true"); + + try { + for (int i = 0; i < RESTARTS; i++) { + IgniteEx ignite = startGrid(0); - ignite.cluster().active(true); + ignite.cluster().active(true); - // Ensure that checkpoint isn't running - otherwise validate indexes task may fail. - forceCheckpoint(); + // Ensure that checkpoint isn't running - otherwise validate indexes task may fail. + forceCheckpoint(); - // Validate indexes on start. - ValidateIndexesClosure clo = new ValidateIndexesClosure(Collections.singleton(CACHE_NAME), 0, 0); - ignite.context().resource().injectGeneric(clo); - VisorValidateIndexesJobResult res = clo.call(); + // Validate indexes on start. + ValidateIndexesClosure clo = new ValidateIndexesClosure(Collections.singleton(CACHE_NAME), 0, 0); + ignite.context().resource().injectGeneric(clo); + VisorValidateIndexesJobResult res = clo.call(); - assertFalse(res.hasIssues()); + assertFalse(res.hasIssues()); - IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Runnable() { - @Override public void run() { - IgniteCache cache = ignite.cache(CACHE_NAME); + IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Runnable() { + @Override public void run() { + IgniteCache cache = ignite.cache(CACHE_NAME); - int i = 0; - try { - for (; i < LOAD_LOOP; i++) { - ThreadLocalRandom r = ThreadLocalRandom.current(); + int i = 0; + try { + for (; i < LOAD_LOOP; i++) { + ThreadLocalRandom r = ThreadLocalRandom.current(); - Integer keySeed = r.nextInt(KEY_BOUND); - UserKey key = new UserKey(keySeed); + Integer keySeed = r.nextInt(KEY_BOUND); + UserKey key = new UserKey(keySeed); - if (r.nextBoolean()) - cache.put(key, new UserValue(r.nextLong())); - else - cache.remove(key); - } + if (r.nextBoolean()) + cache.put(key, new UserValue(r.nextLong())); + else + cache.remove(key); + } - ignite.close(); // Intentionally stop grid while another loaders are still in progress. - } - catch (Exception e) { - log.warning("Failed to update cache after " + i + " loop cycles", e); - } - } - }, THREADS, "loader"); + ignite.close(); // Intentionally stop grid while another loaders are still in progress. + } + catch (Exception e) { + log.warning("Failed to update cache after " + i + " loop cycles", e); + } + } + }, THREADS, "loader"); - fut.get(); + fut.get(); - ignite.close(); + ignite.close(); + } } + finally { + System.clearProperty(PageMemoryTrackerPluginProvider.IGNITE_ENABLE_PAGE_MEMORY_TRACKER); + } } /**