use of com.hazelcast.client.test.IdentifiedDataSerializableFactory in project hazelcast by hazelcast.
the class RingbufferTest method init.
@Before
public void init() {
Config config = new Config();
config.addRingBufferConfig(new RingbufferConfig("rb*").setCapacity(CAPACITY));
// Set operation timeout to larger than test timeout. So the tests do not pass accidentally because of retries.
// The tests should depend on notifier system, not retrying.
config.setProperty("hazelcast.operation.call.timeout.millis", "305000");
config.getSerializationConfig().addDataSerializableFactory(IdentifiedDataSerializableFactory.FACTORY_ID, new IdentifiedDataSerializableFactory());
server = hazelcastFactory.newHazelcastInstance(config);
ClientConfig clientConfig = new ClientConfig();
clientConfig.getSerializationConfig().addDataSerializableFactory(IdentifiedDataSerializableFactory.FACTORY_ID, new IdentifiedDataSerializableFactory());
client = hazelcastFactory.newHazelcastClient(clientConfig);
String name = "rb-" + randomString();
serverRingbuffer = server.getRingbuffer(name);
clientRingbuffer = client.getRingbuffer(name);
}
Aggregations