Search in sources :

Example 1 with WhitelistedEP

use of usercodedeployment.whitelisted.WhitelistedEP 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);
}
Also used : WhitelistedEP(usercodedeployment.whitelisted.WhitelistedEP) Config(com.hazelcast.config.Config) UserCodeDeploymentConfig(com.hazelcast.config.UserCodeDeploymentConfig) FilteringClassLoader(com.hazelcast.util.FilteringClassLoader) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

Config (com.hazelcast.config.Config)1 UserCodeDeploymentConfig (com.hazelcast.config.UserCodeDeploymentConfig)1 ParallelTest (com.hazelcast.test.annotation.ParallelTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 FilteringClassLoader (com.hazelcast.util.FilteringClassLoader)1 Test (org.junit.Test)1 WhitelistedEP (usercodedeployment.whitelisted.WhitelistedEP)1