Search in sources :

Example 16 with SerializerConfig

use of com.hazelcast.config.SerializerConfig in project hazelcast by hazelcast.

the class SerializerHookLoaderTest method testLoad_typeException.

@Test(expected = HazelcastSerializationException.class)
public void testLoad_typeException() throws Exception {
    SerializerConfig serializerConfig = new SerializerConfig();
    serializerConfig.setClassName("com.hazelcast.internal.serialization.impl.TestSerializerHook$TestSerializer");
    serializerConfig.setTypeClassName("NOT FOUND CLASS");
    SerializationConfig serializationConfig = getConfig().getSerializationConfig();
    serializationConfig.addSerializerConfig(serializerConfig);
    new SerializerHookLoader(serializationConfig, classLoader);
}
Also used : SerializerConfig(com.hazelcast.config.SerializerConfig) SerializationConfig(com.hazelcast.config.SerializationConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 17 with SerializerConfig

use of com.hazelcast.config.SerializerConfig in project hazelcast by hazelcast.

the class SerializerHookLoaderTest method testLoad_implException.

@Test(expected = HazelcastSerializationException.class)
public void testLoad_implException() throws Exception {
    SerializerConfig serializerConfig = new SerializerConfig();
    serializerConfig.setClassName("NOT FOUND CLASS");
    serializerConfig.setTypeClassName("com.hazelcast.nio.serialization.SampleIdentifiedDataSerializable");
    SerializationConfig serializationConfig = getConfig().getSerializationConfig();
    serializationConfig.addSerializerConfig(serializerConfig);
    new SerializerHookLoader(serializationConfig, classLoader);
}
Also used : SerializerConfig(com.hazelcast.config.SerializerConfig) SerializationConfig(com.hazelcast.config.SerializationConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

SerializerConfig (com.hazelcast.config.SerializerConfig)17 SerializationConfig (com.hazelcast.config.SerializationConfig)14 QuickTest (com.hazelcast.test.annotation.QuickTest)11 Test (org.junit.Test)11 ParallelTest (com.hazelcast.test.annotation.ParallelTest)6 DefaultSerializationServiceBuilder (com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder)5 GlobalSerializerConfig (com.hazelcast.config.GlobalSerializerConfig)3 SerializationService (com.hazelcast.spi.serialization.SerializationService)3 ClientConfig (com.hazelcast.client.config.ClientConfig)2 Config (com.hazelcast.config.Config)2 ClassDefinition (com.hazelcast.nio.serialization.ClassDefinition)2 ClassDefinitionBuilder (com.hazelcast.nio.serialization.ClassDefinitionBuilder)2 SampleIdentifiedDataSerializable (com.hazelcast.nio.serialization.SampleIdentifiedDataSerializable)2 LoadBalancer (com.hazelcast.client.LoadBalancer)1 ProxyFactoryConfig (com.hazelcast.client.config.ProxyFactoryConfig)1 RoundRobinLB (com.hazelcast.client.util.RoundRobinLB)1 NearCacheConfig (com.hazelcast.config.NearCacheConfig)1 XMLConfigBuilderTest (com.hazelcast.config.XMLConfigBuilderTest)1 HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 InternalSerializationService (com.hazelcast.internal.serialization.InternalSerializationService)1