use of org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder in project ignite by apache.
the class WithKeepBinaryCacheConfigVariationsFullApiTestSuite method suite.
/**
* @return Cache API test suite.
* @throws Exception If failed.
*/
@SuppressWarnings("serial")
public static TestSuite suite() throws Exception {
TestSuite suite = new TestSuite("With Keep Binary Cache Config Variations Full API Test Suite");
suite.addTest(new ConfigVariationsTestSuiteBuilder("With Keep Binary Cache Test Suite", WithKeepBinaryCacheFullApiTest.class).withBasicCacheParams().withIgniteConfigFilters(new IgnitePredicate<IgniteConfiguration>() {
@Override
public boolean apply(IgniteConfiguration cfg) {
return cfg.getMarshaller() instanceof BinaryMarshaller;
}
}).gridsCount(5).backups(1).testedNodesCount(3).withClients().build());
suite.addTest(new ConfigVariationsTestSuiteBuilder("With Keep Binary Cache with Interceptor Test Suite", WithKeepBinaryCacheFullApiTest.class).withBasicCacheParams().withIgniteConfigFilters(new IgnitePredicate<IgniteConfiguration>() {
@Override
public boolean apply(IgniteConfiguration cfg) {
return cfg.getMarshaller() instanceof BinaryMarshaller;
}
}).gridsCount(5).backups(1).testedNodesCount(3).withClients().build());
return suite;
}
use of org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder in project ignite by apache.
the class IgniteContinuousQueryConfigVariationsSuite method suite.
/**
* @return Test suite.
* @throws Exception If failed.
*/
public static TestSuite suite() throws Exception {
System.setProperty(IGNITE_DISCOVERY_HISTORY_SIZE, "100");
TestSuite suite = new TestSuite("Ignite Continuous Query Config Variations Suite");
CacheContinuousQueryVariationsTest.singleNode = false;
suite.addTest(new ConfigVariationsTestSuiteBuilder("5 nodes 1 backup", CacheContinuousQueryVariationsTest.class).withBasicCacheParams().gridsCount(5).backups(2).build());
CacheContinuousQueryVariationsTest.singleNode = true;
suite.addTest(new ConfigVariationsTestSuiteBuilder("Single node", CacheContinuousQueryVariationsTest.class).withBasicCacheParams().gridsCount(1).build());
return suite;
}
use of org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder in project ignite by apache.
the class ConfigVariationsTestSuiteBuilderTest method testDefaults.
/**
* @throws Exception If failed.
*/
public void testDefaults() throws Exception {
TestSuite dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).build();
assertEquals(4, dfltSuite.countTestCases());
TestSuite dfltCacheSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).withBasicCacheParams().build();
assertEquals(4 * 4 * 2, dfltCacheSuite.countTestCases());
// With clients.
dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).testedNodesCount(2).withClients().build();
assertEquals(4 * 2, dfltSuite.countTestCases());
dfltCacheSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).withBasicCacheParams().testedNodesCount(3).withClients().build();
assertEquals(4 * 4 * 2 * 3, dfltCacheSuite.countTestCases());
}
Aggregations