use of com.hazelcast.spi.impl.operationservice.InvocationBuilder in project hazelcast by hazelcast.
the class Invocation_ServerConnectionManagerTest method testInvocation_whenEndpointManagerIsNoop.
@Test
public void testInvocation_whenEndpointManagerIsNoop() {
TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory();
HazelcastInstance hz1 = factory.newHazelcastInstance();
HazelcastInstance hz2 = factory.newHazelcastInstance();
String key = generateKeyOwnedBy(hz2);
Data dataKey = getSerializationService(hz1).toData(key);
Partition partition = hz1.getPartitionService().getPartition(key);
Operation op = new GetOperation("test", dataKey);
InvocationBuilder builder = getNodeEngineImpl(hz1).getOperationService().createInvocationBuilder(MapService.SERVICE_NAME, op, partition.getPartitionId());
builder.setConnectionManager(new NoopEndpointManager());
expected.expect(UnsupportedOperationException.class);
expected.expectMessage(EXPECTED_MSG);
builder.invoke().join();
}
Aggregations