From a1d17d12c7a06651e05f5ce7b64f9bdffa97a670 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Mon, 16 Dec 2024 18:50:41 +0300 Subject: [PATCH] IGNITE-23994 Remove setForceServerMode from GridCacheClientModesAbstractSelfTest (#11743) --- .../GridCacheClientModesAbstractSelfTest.java | 12 +----------- ...lientModesTcpClientDiscoveryAbstractTest.java | 16 ---------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java index 762eca37c0ee9..a753c81929f3a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java @@ -29,7 +29,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.G; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.junit.Test; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -71,14 +70,12 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst int cnt = gridCnt.incrementAndGet(); - if ((cnt == gridCount() && isClientStartedLast()) || (cnt == 1 && !isClientStartedLast())) { + if (cnt == gridCount()) { cfg.setClientMode(true); nearOnlyIgniteInstanceName = igniteInstanceName; } - ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setForceServerMode(true); - return cfg; } @@ -105,13 +102,6 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst return PARTITIONED; } - /** - * @return boolean {@code True} if client's grid must be started last, {@code false} if it must be started first. - */ - protected boolean isClientStartedLast() { - return false; - } - /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesTcpClientDiscoveryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesTcpClientDiscoveryAbstractTest.java index 64093c13a78e8..8489298cb2b66 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesTcpClientDiscoveryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesTcpClientDiscoveryAbstractTest.java @@ -19,9 +19,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -31,20 +29,6 @@ */ @SuppressWarnings("RedundantMethodOverride") public abstract class GridCacheClientModesTcpClientDiscoveryAbstractTest extends GridCacheClientModesAbstractSelfTest { - /** {@inheritDoc} */ - @Override protected boolean isClientStartedLast() { - return true; - } - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setForceServerMode(false); - - return cfg; - } - /** */ public static class CaseNearReplicatedAtomic extends GridCacheClientModesTcpClientDiscoveryAbstractTest { /** {@inheritDoc} */