use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class ConfigVariationsTestSuiteBuilderTest method testIgniteConfigFilter.
/**
* @throws Exception If failed.
*/
@SuppressWarnings("serial")
public void testIgniteConfigFilter() throws Exception {
TestSuite dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).build();
final AtomicInteger cnt = new AtomicInteger();
TestSuite filteredSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).withIgniteConfigFilters(new IgnitePredicate<IgniteConfiguration>() {
@Override
public boolean apply(IgniteConfiguration configuration) {
return cnt.getAndIncrement() % 2 == 0;
}
}).build();
assertEquals(dfltSuite.countTestCases() / 2, filteredSuite.countTestCases());
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgniteCacheThreadLocalTxTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
cfg.setClientMode(client);
return cfg;
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgfsServerManagerIpcEndpointRegistrationAbstractSelfTest method testLoopbackEndpointsRegistration.
/**
* @throws Exception If failed.
*/
public void testLoopbackEndpointsRegistration() throws Exception {
IgniteConfiguration cfg = gridConfiguration();
cfg.setFileSystemConfiguration(igfsConfiguration(IgfsIpcEndpointType.TCP, IgfsIpcEndpointConfiguration.DFLT_PORT, null));
G.start(cfg);
T2<Integer, Integer> res = checkRegisteredIpcEndpoints();
// One regular enpoint + one management endpoint.
assertEquals(2, res.get1().intValue());
assertEquals(0, res.get2().intValue());
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgfsServerManagerIpcEndpointRegistrationOnLinuxAndMacSelfTest method testLoopbackAndShmemEndpointsRegistration.
/**
* @throws Exception If failed.
*/
public void testLoopbackAndShmemEndpointsRegistration() throws Exception {
IgniteConfiguration cfg = gridConfigurationManyIgfsCaches(3);
cfg.setFileSystemConfiguration(// Check null IPC endpoint config won't bring any hassles.
igfsConfiguration(null, null, null, "partitioned0", "replicated0"), igfsConfiguration(IgfsIpcEndpointType.TCP, IgfsIpcEndpointConfiguration.DFLT_PORT + 1, null, "partitioned1", "replicated1"), igfsConfiguration(IgfsIpcEndpointType.SHMEM, IgfsIpcEndpointConfiguration.DFLT_PORT + 2, null, "partitioned2", "replicated2"));
G.start(cfg);
T2<Integer, Integer> res = checkRegisteredIpcEndpoints();
// 1 regular + 3 management TCP endpoins.
assertEquals(4, res.get1().intValue());
assertEquals(2, res.get2().intValue());
}
use of org.apache.ignite.configuration.IgniteConfiguration in project ignite by apache.
the class IgniteCacheQueryH2IndexingLeakTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration(cacheConfiguration());
return cfg;
}
Aggregations