-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
ScriptingManager.removeScript() method call with existing script name throws following exception:
org.infinispan.commons.CacheException: ISPN026005: No script named 'test.js'
at org.infinispan.scripting.impl.ScriptingManagerImpl.removeScript(ScriptingManagerImpl.java:121)
at org.infinispan.scripting.ScriptingTest.testRemovingScript(ScriptingTest.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
...
The test code for script removing is:
public void testRemovingScript() throws Exception { assertNotNull(cacheManager.getCache(ScriptingManager.SCRIPT_CACHE).get("test.js")); scriptingManager.removeScript("test.js"); assertNull(cacheManager.getCache(ScriptingManager.SCRIPT_CACHE).get("test.js")); }
UPDATE:
After 7d0aa92 commit pushed, the exception is not thrown any more. But when removing an existent script, it is only removed from the compiled scripts. The script is still present in the Script cache.
The same situation refers to the clear() action on Script cache. When the command given below is called, the cache is not cleared only the compiled scripts map is cleared.