This is an automated email from the ASF dual-hosted git repository. gvvinblade pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push: new f94cbee IGNITE-10692: MVCC: Test GridCacheDhtPreloadDelayedSelfTest fails in mvcc mode. this closes #5671. f94cbee is described below commit f94cbeea9cdef01eb5c62348722c6c92afe14a4b Author: Andrey V. Mashenkov <andrey.mashen...@gmail.com> AuthorDate: Mon Jan 14 14:43:28 2019 +0300 IGNITE-10692: MVCC: Test GridCacheDhtPreloadDelayedSelfTest fails in mvcc mode. this closes #5671. --- .../distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java | 6 +++++- .../distributed/near/GridPartitionedBackupLoadSelfTest.java | 4 ++++ .../testframework/junits/common/GridCommonAbstractTest.java | 12 +++++++++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java index 2926252..f3c6276 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java @@ -35,6 +35,7 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.events.Event; import org.apache.ignite.events.EventType; import org.apache.ignite.internal.IgniteKernal; +import org.apache.ignite.internal.processors.cache.GridCacheAdapter; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader; @@ -389,7 +390,10 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest { * @return Topology. */ private GridDhtPartitionTopology topology(Ignite g) { - return ((GridNearCacheAdapter<Integer, String>)((IgniteKernal)g).<Integer, String>internalCache(DEFAULT_CACHE_NAME)).dht().topology(); + GridCacheAdapter<Integer, String> internalCache = ((IgniteKernal)g).internalCache(DEFAULT_CACHE_NAME); + + return internalCache.isNear() ? ((GridNearCacheAdapter<Integer, String>)internalCache).dht().topology() : + internalCache.context().dht().topology(); } /** diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java index 5d95606..2b4945b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java @@ -24,6 +24,7 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.store.CacheStoreAdapter; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; import org.junit.runner.RunWith; @@ -75,6 +76,9 @@ public class GridPartitionedBackupLoadSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-8582"); + startGridsMultiThreaded(GRID_CNT); } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java index 4344f15..5a55bf5 100755 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java @@ -323,7 +323,9 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest { * @return DHT cache. */ protected <K, V> GridDhtCacheAdapter<K, V> dht() { - return this.<K, V>near().dht(); + GridCacheAdapter<K, V> internalCache = ((IgniteKernal)grid()).internalCache(DEFAULT_CACHE_NAME); + + return internalCache.isNear() ? internalCache.context().near().dht() : internalCache.context().dht(); } /** @@ -331,7 +333,9 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest { * @return DHT cache. */ protected <K, V> GridDhtCacheAdapter<K, V> dht(int idx) { - return this.<K, V>near(idx).dht(); + GridCacheAdapter<K, V> internalCache = ((IgniteKernal)grid(idx)).internalCache(DEFAULT_CACHE_NAME); + + return internalCache.isNear() ? internalCache.context().near().dht() : internalCache.context().dht(); } /** @@ -340,7 +344,9 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest { * @return DHT cache. */ protected <K, V> GridDhtCacheAdapter<K, V> dht(int idx, String cache) { - return this.<K, V>near(idx, cache).dht(); + GridCacheAdapter<K, V> internalCache = ((IgniteKernal)grid(idx)).internalCache(cache); + + return internalCache.isNear() ? internalCache.context().near().dht() : internalCache.context().dht(); } /**