Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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