You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ni...@apache.org on 2024/12/16 09:15:48 UTC

(ignite) branch master updated: IGNITE-23992 Remove setForceServerMode from GridCacheRebalancingOrderingTest (#11741)

This is an automated email from the ASF dual-hosted git repository.

nizhikov 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 c1f6dc4a311 IGNITE-23992 Remove setForceServerMode from GridCacheRebalancingOrderingTest (#11741)
c1f6dc4a311 is described below

commit c1f6dc4a31170cb32dd97eab8374311461e3a1de
Author: Nikolay <ni...@apache.org>
AuthorDate: Mon Dec 16 12:15:40 2024 +0300

    IGNITE-23992 Remove setForceServerMode from GridCacheRebalancingOrderingTest (#11741)
---
 .../rebalancing/GridCacheRebalancingOrderingTest.java   | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java
index b470a57a3a5..6b6ab95cab8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java
@@ -57,7 +57,6 @@ import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.services.Service;
 import org.apache.ignite.services.ServiceConfiguration;
 import org.apache.ignite.services.ServiceContext;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -119,12 +118,7 @@ public class GridCacheRebalancingOrderingTest extends GridCommonAbstractTest {
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
-        if (isFirstGrid(igniteInstanceName)) {
-            assert cfg.getDiscoverySpi() instanceof TcpDiscoverySpi : cfg.getDiscoverySpi();
-
-            ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setForceServerMode(true);
-        }
-        else
+        if (!isFirstGrid(igniteInstanceName))
             cfg.setServiceConfiguration(getServiceConfiguration());
 
         cfg.setCacheConfiguration(getCacheConfiguration());
@@ -165,11 +159,6 @@ public class GridCacheRebalancingOrderingTest extends GridCommonAbstractTest {
         return cfg;
     }
 
-    /** {@inheritDoc} */
-    @Override protected boolean isMultiJvm() {
-        return true;
-    }
-
     /** {@inheritDoc} */
     @Override protected long getTestTimeout() {
         return 1000 * 60 * 5;
@@ -271,10 +260,10 @@ public class GridCacheRebalancingOrderingTest extends GridCommonAbstractTest {
      */
     @Test
     public void testEvents() throws Exception {
-        Ignite ignite = startClientGrid(0);
-
         ServerStarter srvStarter = startServers();
 
+        Ignite ignite = startClientGrid(0);
+
         IgniteCache<IntegerKey, Integer> cache = ignite.cache(TEST_CACHE_NAME);
 
         // Generate a key per partition.