public virtual void testDisableCachingOfScriptEngineInProcessApplication() { // given EmbeddedProcessApplication processApplication = new EmbeddedProcessApplication(); // when ScriptEngine engine = processApplication.getScriptEngineForName(SCRIPT_LANGUAGE, false); // then assertNotNull(engine); assertFalse(engine.Equals(processApplication.getScriptEngineForName(SCRIPT_LANGUAGE, false))); }
public virtual void testFetchScriptEngineFromPaDisableCaching() { // then processEngineConfiguration.EnableScriptEngineCaching = false; ScriptingEngines.EnableScriptEngineCaching = false; EmbeddedProcessApplication processApplication = new EmbeddedProcessApplication(); ProcessApplicationDeployment deployment = repositoryService.createDeployment(processApplication.Reference).addClasspathResource(PROCESS_PATH).deploy(); // when ScriptEngine engine = getScriptEngineFromPa(SCRIPT_LANGUAGE, processApplication); // then assertNotNull(engine); assertFalse(engine.Equals(getScriptEngineFromPa(SCRIPT_LANGUAGE, processApplication))); // not cached in pa assertFalse(engine.Equals(processApplication.getScriptEngineForName(SCRIPT_LANGUAGE, false))); repositoryService.deleteDeployment(deployment.Id, true); processEngineConfiguration.EnableScriptEngineCaching = true; ScriptingEngines.EnableScriptEngineCaching = true; }
public virtual void testFetchScriptEngineFromPaEnableCaching() { // then EmbeddedProcessApplication processApplication = new EmbeddedProcessApplication(); ProcessApplicationDeployment deployment = repositoryService.createDeployment(processApplication.Reference).addClasspathResource(PROCESS_PATH).deploy(); // when ScriptEngine engine = getScriptEngineFromPa(SCRIPT_LANGUAGE, processApplication); // then assertNotNull(engine); assertEquals(engine, getScriptEngineFromPa(SCRIPT_LANGUAGE, processApplication)); // cached in pa assertEquals(engine, processApplication.getScriptEngineForName(SCRIPT_LANGUAGE, true)); repositoryService.deleteDeployment(deployment.Id, true); }