use of org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder in project ignite by apache.
the class IgniteComputeBasicConfigVariationsFullApiTestSuite method suite.
/**
* @return Compute API test suite.
* @throws Exception If failed.
*/
public static TestSuite suite() throws Exception {
TestSuite suite = new TestSuite("Compute New Full API Test Suite");
suite.addTest(new ConfigVariationsTestSuiteBuilder("Single server", IgniteComputeConfigVariationsFullApiTest.class).igniteParams(BASIC_COMPUTE_SET).gridsCount(1).build());
// Tests run on server (node#0) & client(node#1).
suite.addTest(new ConfigVariationsTestSuiteBuilder("3 servers, 1 client", IgniteComputeConfigVariationsFullApiTest.class).igniteParams(BASIC_COMPUTE_SET).gridsCount(4).testedNodesCount(2).withClients().build());
return suite;
}
use of org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder 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.testframework.configvariations.ConfigVariationsTestSuiteBuilder in project ignite by apache.
the class ConfigVariationsTestSuiteBuilderTest method testCacheConfigFilter.
/**
* @throws Exception If failed.
*/
@SuppressWarnings("serial")
public void testCacheConfigFilter() throws Exception {
TestSuite dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).withBasicCacheParams().build();
final AtomicInteger cnt = new AtomicInteger();
TestSuite filteredSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class).withBasicCacheParams().withCacheConfigFilters(new IgnitePredicate<CacheConfiguration>() {
@Override
public boolean apply(CacheConfiguration configuration) {
return cnt.getAndIncrement() % 2 == 0;
}
}).build();
assertEquals(dfltSuite.countTestCases() / 2, filteredSuite.countTestCases());
}
use of org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder in project ignite by apache.
the class IgniteMessagingConfigVariationFullApiTestSuite method suite.
/**
* @return Messaging test suite.
* @throws Exception If failed.
*/
public static TestSuite suite() throws Exception {
TestSuite suite = new TestSuite("Compute New Full API Test Suite");
suite.addTest(new ConfigVariationsTestSuiteBuilder("Single server", IgniteMessagingConfigVariationFullApiTest.class).gridsCount(1).igniteParams(GRID_PARAMETER_VARIATION).build());
suite.addTest(new ConfigVariationsTestSuiteBuilder("Multiple servers and client", IgniteMessagingConfigVariationFullApiTest.class).testedNodesCount(2).gridsCount(6).withClients().igniteParams(GRID_PARAMETER_VARIATION).build());
return suite;
}
use of org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder in project ignite by apache.
the class IgniteServiceConfigVariationsFullApiTestSuite method suite.
/**
* @return Compute API test suite.
* @throws Exception If failed.
*/
public static TestSuite suite() throws Exception {
TestSuite suite = new TestSuite("Service Deployment New Full API Test Suite");
suite.addTest(new ConfigVariationsTestSuiteBuilder("Single server", IgniteServiceConfigVariationsFullApiTest.class).igniteParams(PARAMS).gridsCount(1).build());
// Tests run on server (node#0) & client(node#1).
suite.addTest(new ConfigVariationsTestSuiteBuilder("1 server, 1 client", IgniteServiceConfigVariationsFullApiTest.class).igniteParams(PARAMS).gridsCount(2).testedNodesCount(2).withClients().build());
// Tests run on servers (node#0,node#2,node#3) & client(node#1).
suite.addTest(new ConfigVariationsTestSuiteBuilder("3 servers, 1 client", IgniteServiceConfigVariationsFullApiTest.class).igniteParams(PARAMS).gridsCount(4).testedNodesCount(2).withClients().build());
// Tests run on servers (node#0,node#2,node#3) & client(node#1,node#4).
suite.addTest(new ConfigVariationsTestSuiteBuilder("3 servers, 2 clients", IgniteServiceConfigVariationsFullApiTest.class).igniteParams(PARAMS).gridsCount(5).testedNodesCount(2).withClients().build());
return suite;
}
Aggregations