Skip to content

Commit

Permalink
IGNITE-10692: Minor.
Browse files Browse the repository at this point in the history
  • Loading branch information
AMashenkov committed Dec 14, 2018
1 parent 00b58c0 commit 8331880
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.MvccFeatureChecker;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -94,6 +95,9 @@ private CacheConfiguration cacheConfiguration() {

/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
if (MvccFeatureChecker.forcedMvcc())
fail("https://issues.apache.org/jira/browse/IGNITE-8582");

startGridsMultiThreaded(GRID_CNT);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,19 @@ protected static <K, V> GridDhtCacheAdapter<K, V> dht(IgniteCache<K, V> cache) {
* @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.isDht() ? internalCache.context().dht() : internalCache.context().near().dht();
}

/**
* @param idx Grid index.
* @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.isDht() ? internalCache.context().dht() : internalCache.context().near().dht();
}

/**
Expand All @@ -336,7 +340,9 @@ protected <K, V> GridDhtCacheAdapter<K, V> dht(int idx) {
* @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.isDht() ? internalCache.context().dht() : internalCache.context().near().dht();
}

/**
Expand Down

0 comments on commit 8331880

Please sign in to comment.