use of usercodedeployment.blacklisted.BlacklistedEP in project hazelcast by hazelcast.
the class UserCodeDeploymentSmokeTest method givenTheEPButItIsBlacklisted_whenTheEPIsFilteredLocally_thenItWillFailToLoadIt.
@Test(expected = HazelcastSerializationException.class)
public void givenTheEPButItIsBlacklisted_whenTheEPIsFilteredLocally_thenItWillFailToLoadIt() {
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).setBlacklistedPrefixes("usercodedeployment.blacklisted").setClassCacheMode(classCacheMode);
EntryProcessor<Integer, Integer> myEP = new BlacklistedEP();
executeSimpleTestScenario(i1Config, i2Config, myEP);
}
use of usercodedeployment.blacklisted.BlacklistedEP in project hazelcast by hazelcast.
the class UserCodeDeploymentBasicTest method givenTheEPButItIsBlacklisted_whenTheEPIsFilteredLocally_thenItWillFailToLoadIt.
@Test
public void givenTheEPButItIsBlacklisted_whenTheEPIsFilteredLocally_thenItWillFailToLoadIt() {
Config i1Config = new Config();
i1Config.getUserCodeDeploymentConfig().setEnabled(true).setClassCacheMode(classCacheMode);
Config i2Config = new Config();
FilteringClassLoader filteringCL = new FilteringClassLoader(singletonList("usercodedeployment"), null);
i2Config.setClassLoader(filteringCL);
i2Config.getUserCodeDeploymentConfig().setEnabled(true).setBlacklistedPrefixes("usercodedeployment.blacklisted").setClassCacheMode(classCacheMode);
EntryProcessor<Integer, Integer, Integer> myEP = new BlacklistedEP();
try {
executeSimpleTestScenario(i1Config, i2Config, myEP);
fail();
} catch (Exception e) {
assertInstanceOfByClassName(HazelcastSerializationException.class.getName(), e);
}
}
Aggregations