use of com.hazelcast.core.EntryEvent in project camel by apache.
the class HazelcastMultimapConsumerTest method testAdd.
@Test
@SuppressWarnings("unchecked")
public void testAdd() throws InterruptedException {
MockEndpoint out = getMockEndpoint("mock:added");
out.expectedMessageCount(1);
EntryEvent<Object, Object> event = new EntryEvent<Object, Object>("foo", null, EntryEventType.ADDED.getType(), "4711", "my-foo");
argument.getValue().entryAdded(event);
assertMockEndpointsSatisfied(5000, TimeUnit.MILLISECONDS);
this.checkHeaders(out.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.ADDED);
}
use of com.hazelcast.core.EntryEvent in project camel by apache.
the class HazelcastMultimapConsumerTest method testEvict.
/*
* mail from talip (hazelcast) on 21.02.2011: MultiMap doesn't support eviction yet. We can and should add this feature.
*/
@Test
@SuppressWarnings("unchecked")
public void testEvict() throws InterruptedException {
MockEndpoint out = getMockEndpoint("mock:evicted");
out.expectedMessageCount(1);
EntryEvent<Object, Object> event = new EntryEvent<Object, Object>("foo", null, EntryEventType.EVICTED.getType(), "4711", "my-foo");
argument.getValue().entryEvicted(event);
assertMockEndpointsSatisfied(30000, TimeUnit.MILLISECONDS);
}
use of com.hazelcast.core.EntryEvent in project camel by apache.
the class HazelcastMultimapConsumerTest method testRemove.
@Test
@SuppressWarnings("unchecked")
public void testRemove() throws InterruptedException {
MockEndpoint out = getMockEndpoint("mock:removed");
out.expectedMessageCount(1);
EntryEvent<Object, Object> event = new EntryEvent<Object, Object>("foo", null, EntryEventType.REMOVED.getType(), "4711", "my-foo");
argument.getValue().entryRemoved(event);
assertMockEndpointsSatisfied(5000, TimeUnit.MILLISECONDS);
this.checkHeaders(out.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.REMOVED);
}
use of com.hazelcast.core.EntryEvent in project wildfly-camel by wildfly-extras.
the class HazelcastMapConsumerIntegrationTest method testUpdate.
@Test
@SuppressWarnings("unchecked")
public void testUpdate() throws Exception {
CamelContext camelctx = createCamelContext();
camelctx.start();
try {
MockEndpoint mock = camelctx.getEndpoint("mock:updated", MockEndpoint.class);
mock.expectedMessageCount(1);
EntryEvent<Object, Object> event = new EntryEvent<Object, Object>("foo", null, EntryEventType.UPDATED.getType(), "4711", "my-foo");
argument.getValue().entryUpdated(event);
mock.assertIsSatisfied(3000);
checkHeaders(mock.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.UPDATED);
} finally {
camelctx.stop();
}
}
use of com.hazelcast.core.EntryEvent in project wildfly-camel by wildfly-extras.
the class HazelcastMapConsumerIntegrationTest method testAdd.
@Test
@SuppressWarnings("unchecked")
public void testAdd() throws Exception {
CamelContext camelctx = createCamelContext();
camelctx.start();
try {
MockEndpoint mock = camelctx.getEndpoint("mock:added", MockEndpoint.class);
mock.expectedMessageCount(1);
EntryEvent<Object, Object> event = new EntryEvent<Object, Object>("foo", null, EntryEventType.ADDED.getType(), "4711", "my-foo");
argument.getValue().entryAdded(event);
mock.assertIsSatisfied(3000);
checkHeaders(mock.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.ADDED);
} finally {
camelctx.stop();
}
}
Aggregations