Search in sources :

Example 26 with HazelcastProperties

use of com.hazelcast.spi.properties.HazelcastProperties in project hazelcast by hazelcast.

the class QueryBasicTest method testPredicatedEvaluatedSingleThreadedByDefault.

@Test
public void testPredicatedEvaluatedSingleThreadedByDefault() {
    Config config = getConfig();
    HazelcastProperties properties = new HazelcastProperties(config);
    boolean parallelEvaluation = properties.getBoolean(GroupProperty.QUERY_PREDICATE_PARALLEL_EVALUATION);
    assertEquals(false, parallelEvaluation);
}
Also used : HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties) MapConfig(com.hazelcast.config.MapConfig) Config(com.hazelcast.config.Config) MapIndexConfig(com.hazelcast.config.MapIndexConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 27 with HazelcastProperties

use of com.hazelcast.spi.properties.HazelcastProperties in project hazelcast by hazelcast.

the class QueryOptimizerFactoryTest method newOptimizer_whenPropertyContainsRule_thenCreateRulesBasedOptimizer.

@Test
public void newOptimizer_whenPropertyContainsRule_thenCreateRulesBasedOptimizer() {
    HazelcastProperties hazelcastProperties = createMockHazelcastProperties(QUERY_OPTIMIZER_TYPE, "RULES");
    QueryOptimizer queryOptimizer = QueryOptimizerFactory.newOptimizer(hazelcastProperties);
    assertThat(queryOptimizer, instanceOf(RuleBasedQueryOptimizer.class));
}
Also used : HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 28 with HazelcastProperties

use of com.hazelcast.spi.properties.HazelcastProperties in project hazelcast by hazelcast.

the class QueryOptimizerFactoryTest method newOptimizer_whenPropertyContainsNone_thenCreateEmptyOptimizer.

@Test
public void newOptimizer_whenPropertyContainsNone_thenCreateEmptyOptimizer() {
    HazelcastProperties hazelcastProperties = createMockHazelcastProperties(QUERY_OPTIMIZER_TYPE, "NONE");
    QueryOptimizer queryOptimizer = QueryOptimizerFactory.newOptimizer(hazelcastProperties);
    assertThat(queryOptimizer, instanceOf(EmptyOptimizer.class));
}
Also used : HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 29 with HazelcastProperties

use of com.hazelcast.spi.properties.HazelcastProperties in project hazelcast by hazelcast.

the class OperationExecutorImpl_AbstractTest method initExecutor.

protected OperationExecutorImpl initExecutor() {
    props = new HazelcastProperties(config);
    executor = new OperationExecutorImpl(props, loggingService, thisAddress, handlerFactory, threadGroup, nodeExtension);
    executor.start();
    return executor;
}
Also used : HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties)

Aggregations

HazelcastProperties (com.hazelcast.spi.properties.HazelcastProperties)29 Config (com.hazelcast.config.Config)12 QuickTest (com.hazelcast.test.annotation.QuickTest)11 Test (org.junit.Test)11 ParallelTest (com.hazelcast.test.annotation.ParallelTest)9 ExecutionService (com.hazelcast.spi.ExecutionService)4 ILogger (com.hazelcast.logging.ILogger)3 Before (org.junit.Before)3 MapConfig (com.hazelcast.config.MapConfig)2 HazelcastThreadGroup (com.hazelcast.instance.HazelcastThreadGroup)2 BatchInvalidator (com.hazelcast.internal.nearcache.impl.invalidation.BatchInvalidator)2 NonStopInvalidator (com.hazelcast.internal.nearcache.impl.invalidation.NonStopInvalidator)2 RecordStore (com.hazelcast.map.impl.recordstore.RecordStore)2 NodeEngine (com.hazelcast.spi.NodeEngine)2 OperationService (com.hazelcast.spi.OperationService)2 Properties (java.util.Properties)2 ClientLoggingService (com.hazelcast.client.impl.ClientLoggingService)1 MapIndexConfig (com.hazelcast.config.MapIndexConfig)1 SSLConfig (com.hazelcast.config.SSLConfig)1 ClusterService (com.hazelcast.internal.cluster.ClusterService)1