Skip to content

Commit

Permalink
IGNITE-23991 Remove setForceServerMode from CacheLateAffinityAssignme…
Browse files Browse the repository at this point in the history
…ntTest (apache#11740)
  • Loading branch information
nizhikov authored Dec 14, 2024
1 parent 2112070 commit c244c5d
Showing 1 changed file with 0 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@
*
*/
public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest {
/** */
private boolean forceSrvMode;

/** */
private static final String CACHE_NAME1 = "testCache1";

Expand Down Expand Up @@ -158,7 +155,6 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest {

TcpDiscoverySpi discoSpi = (TcpDiscoverySpi)cfg.getDiscoverySpi();

discoSpi.setForceServerMode(forceSrvMode);
discoSpi.setNetworkTimeout(60_000);

cfg.setClientFailureDetectionTimeout(100000);
Expand Down Expand Up @@ -1949,62 +1945,11 @@ public void testInitCacheReceivedOnJoin() throws Exception {
checkAffinity(4, topVer(4, 0), true);
}

/**
* @throws Exception If failed.
*/
@Test
public void testClientStartFirst1() throws Exception {
clientStartFirst(1);
}

/**
* @throws Exception If failed.
*/
@Test
public void testClientStartFirst2() throws Exception {
clientStartFirst(3);
}

/**
* @param clients Number of client nodes.
* @throws Exception If failed.
*/
private void clientStartFirst(int clients) throws Exception {
forceSrvMode = true;

int topVer = 0;

for (int i = 0; i < clients; i++)
startClient(topVer, ++topVer);

cacheC = new IgniteClosure<String, CacheConfiguration[]>() {
@Override public CacheConfiguration[] apply(String nodeName) {
return null;
}
};

startServer(topVer, ++topVer);

checkAffinity(topVer, topVer(topVer, 0), true);

startServer(topVer, ++topVer);

checkAffinity(topVer, topVer(topVer, 0), false);

checkAffinity(topVer, topVer(topVer, 1), true);

stopNode(clients, ++topVer);

checkAffinity(clients + 1, topVer(topVer, 0), true);
}

/**
* @throws Exception If failed.
*/
@Test
public void testRandomOperations() throws Exception {
forceSrvMode = true;

final int MAX_SRVS = 10;
final int MAX_CLIENTS = 10;
final int MAX_CACHES = 15;
Expand Down

0 comments on commit c244c5d

Please sign in to comment.