Search in sources :

Example 6 with ConfigVariationsTestSuiteBuilder

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;
}
Also used : ConfigVariationsTestSuiteBuilder(org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder) TestSuite(junit.framework.TestSuite) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller)

Example 7 with ConfigVariationsTestSuiteBuilder

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;
}
Also used : ConfigVariationsTestSuiteBuilder(org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder) CacheContinuousQueryVariationsTest(org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryVariationsTest) TestSuite(junit.framework.TestSuite)

Example 8 with ConfigVariationsTestSuiteBuilder

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());
}
Also used : ConfigVariationsTestSuiteBuilder(org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder) TestSuite(junit.framework.TestSuite)

Aggregations

TestSuite (junit.framework.TestSuite)8 ConfigVariationsTestSuiteBuilder (org.apache.ignite.testframework.configvariations.ConfigVariationsTestSuiteBuilder)8 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)2 IgnitePredicate (org.apache.ignite.lang.IgnitePredicate)2 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)1 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)1 CacheContinuousQueryVariationsTest (org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryVariationsTest)1