use of org.apache.ignite.testframework.GridStringLogger in project ignite by apache.
the class JdbcThinConnectionMvccEnabledSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@SuppressWarnings({ "deprecation", "unchecked" })
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME).setNearConfiguration(null));
cfg.setMarshaller(new BinaryMarshaller());
cfg.setGridLogger(new GridStringLogger());
return cfg;
}
use of org.apache.ignite.testframework.GridStringLogger in project ignite by apache.
the class JdbcThinConnectionSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@SuppressWarnings("deprecation")
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME));
cfg.setMarshaller(new BinaryMarshaller());
cfg.setGridLogger(new GridStringLogger());
return cfg;
}
use of org.apache.ignite.testframework.GridStringLogger in project ignite by apache.
the class JdbcThinTransactionsWithMvccEnabledSelfTest method getConfiguration.
/**
* {@inheritDoc}
*/
@SuppressWarnings({ "deprecation", "unchecked" })
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME).setNearConfiguration(null));
cfg.setMarshaller(new BinaryMarshaller());
cfg.setGridLogger(log = new GridStringLogger());
return cfg;
}
use of org.apache.ignite.testframework.GridStringLogger in project ignite by apache.
the class ClientConfigurationTest method testRebalanceThreadPoolSize.
/**
* Test check the case when {@link IgniteConfiguration#getRebalanceThreadPoolSize()} is equal to {@link
* IgniteConfiguration#getSystemThreadPoolSize()}
*/
@Test
public void testRebalanceThreadPoolSize() {
GridStringLogger gridStrLog = new GridStringLogger();
gridStrLog.logLength(1024 * 100);
IgniteConfiguration cci = Config.getServerConfiguration().setClientMode(true);
cci.setRebalanceThreadPoolSize(cci.getSystemThreadPoolSize());
cci.setGridLogger(gridStrLog);
try (Ignite si = Ignition.start(Config.getServerConfiguration());
Ignite ci = Ignition.start(cci)) {
Set<ClusterNode> collect = si.cluster().nodes().stream().filter(new Predicate<ClusterNode>() {
@Override
public boolean test(ClusterNode clusterNode) {
return clusterNode.isClient();
}
}).collect(Collectors.toSet());
String log = gridStrLog.toString();
boolean containsMsg = log.contains("Setting the rebalance pool size has no effect on the client mode");
Assert.assertTrue(containsMsg);
Assert.assertEquals(1, collect.size());
}
}
use of org.apache.ignite.testframework.GridStringLogger in project ignite by apache.
the class GridNoopManagerSelfTest method testEnabledManager.
/**
*/
@Test
public void testEnabledManager() throws IgniteCheckedException {
GridTestKernalContext ctx = new GridTestKernalContext(new GridStringLogger());
assertTrue(new Manager(ctx, new Spi()).enabled());
assertFalse(new Manager(ctx, new NoopSpi()).enabled());
assertTrue(new Manager(ctx, new Spi(), new NoopSpi()).enabled());
assertTrue(new Manager(ctx, new NoopSpi(), new Spi()).enabled());
}
Aggregations