use of com.hazelcast.util.FilteringClassLoader in project hazelcast by hazelcast.
the class UserCodeDeploymentSmokeTest method givenSomeMemberCanAccessTheEP_whenTheEPIsFilteredLocally_thenItWillBeLoadedOverNetwork.
@Test
public void givenSomeMemberCanAccessTheEP_whenTheEPIsFilteredLocally_thenItWillBeLoadedOverNetwork() {
Config i1Config = new Config();
i1Config.getUserCodeDeploymentConfig().setEnabled(true).setClassCacheMode(classCacheMode);
Config i2Config = new Config();
FilteringClassLoader filteringCL = new FilteringClassLoader(asList("usercodedeployment"), null);
i2Config.setClassLoader(filteringCL);
i2Config.getUserCodeDeploymentConfig().setEnabled(true).setClassCacheMode(classCacheMode);
IncrementingEntryProcessor incrementingEntryProcessor = new IncrementingEntryProcessor();
executeSimpleTestScenario(i1Config, i2Config, incrementingEntryProcessor);
}
use of com.hazelcast.util.FilteringClassLoader in project hazelcast by hazelcast.
the class UserCodeDeploymentSmokeTest method givenTheEPIsOnTheWhitelist_whenTheEPIsFilteredLocally_thenItWillLoadIt.
@Test
public void givenTheEPIsOnTheWhitelist_whenTheEPIsFilteredLocally_thenItWillLoadIt() {
Config i1Config = new Config();
i1Config.getUserCodeDeploymentConfig().setEnabled(true).setClassCacheMode(classCacheMode);
Config i2Config = new Config();
FilteringClassLoader filteringCL = new FilteringClassLoader(asList("usercodedeployment"), null);
i2Config.setClassLoader(filteringCL);
i2Config.getUserCodeDeploymentConfig().setEnabled(true).setWhitelistedPrefixes("usercodedeployment.whitelisted, usercodedeployment").setClassCacheMode(classCacheMode);
EntryProcessor<Integer, Integer> myEP = new WhitelistedEP();
executeSimpleTestScenario(i1Config, i2Config, myEP);
}
Aggregations