use of com.hazelcast.client.impl.spi.impl.ClientUserCodeDeploymentService in project hazelcast by hazelcast.
the class ClientUserCodeDeploymentConfigTest method testConfigWithFileDoesNotExist.
@Test(expected = FileNotFoundException.class)
public void testConfigWithFileDoesNotExist() throws ClassNotFoundException, IOException {
ClientUserCodeDeploymentConfig config = new ClientUserCodeDeploymentConfig();
config.setEnabled(true);
ClassLoader classLoader = getClass().getClassLoader();
File file = new File("/wrongPath/IncrementingEntryProcessor.jar");
config.addJar(file);
ClientUserCodeDeploymentService service = new ClientUserCodeDeploymentService(config, classLoader);
service.start();
}
use of com.hazelcast.client.impl.spi.impl.ClientUserCodeDeploymentService in project hazelcast by hazelcast.
the class ClientUserCodeDeploymentConfigTest method testConfigWithClass.
@Test
public void testConfigWithClass() throws ClassNotFoundException, IOException {
ClientUserCodeDeploymentConfig config = new ClientUserCodeDeploymentConfig();
config.setEnabled(true);
config.addClass(IncrementingEntryProcessor.class);
ClientUserCodeDeploymentService service = new ClientUserCodeDeploymentService(config, this.getClass().getClassLoader());
service.start();
List<Map.Entry<String, byte[]>> list = service.getClassDefinitionList();
assertClassLoaded(list, IncrementingEntryProcessor.class.getName());
}
Aggregations