use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgniteCachePutStackOverflowSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(IP_FINDER);
cfg.setDiscoverySpi(discoSpi);
return cfg;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgniteCacheReadThroughStoreCallTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgniteCacheSerializationSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
if (getTestIgniteInstanceName(CLIENT).equals(igniteInstanceName))
cfg.setClientMode(true);
return cfg;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgniteCacheInvokeReadThroughAbstractTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class GridAbstractTest method setUp.
/**
* {@inheritDoc}
*/
@Override
protected void setUp() throws Exception {
stopGridErr = false;
clsLdr = Thread.currentThread().getContextClassLoader();
// Change it to the class one.
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
// Clear log throttle.
LT.clear();
TestCounters cntrs = getTestCounters();
if (isDebug())
info("Test counters [numOfTests=" + cntrs.getNumberOfTests() + ", started=" + cntrs.getStarted() + ", stopped=" + cntrs.getStopped() + ']');
if (cntrs.isReset()) {
info("Resetting test counters.");
int started = cntrs.getStarted() % cntrs.getNumberOfTests();
int stopped = cntrs.getStopped() % cntrs.getNumberOfTests();
cntrs.reset();
cntrs.setStarted(started);
cntrs.setStopped(stopped);
}
if (isFirstTest()) {
info(">>> Starting test class: " + testClassDescription() + " <<<");
if (startGrid) {
IgniteConfiguration cfg = optimize(getConfiguration());
G.start(cfg);
}
try {
List<Integer> jvmIds = IgniteNodeRunner.killAll();
if (!jvmIds.isEmpty())
log.info("Next processes of IgniteNodeRunner were killed: " + jvmIds);
beforeTestsStarted();
} catch (Exception | Error t) {
t.printStackTrace();
getTestCounters().setStopped(getTestCounters().getNumberOfTests() - 1);
try {
tearDown();
} catch (Exception e) {
log.error("Failed to tear down test after exception was thrown in beforeTestsStarted (will " + "ignore)", e);
}
throw t;
}
}
info(">>> Starting test: " + testDescription() + " <<<");
try {
beforeTest();
} catch (Exception | Error t) {
try {
tearDown();
} catch (Exception e) {
log.error("Failed to tear down test after exception was thrown in beforeTest (will ignore)", e);
}
throw t;
}
ts = System.currentTimeMillis();
}
Aggregations