Merge branch 'master' of github.com:thingsboard/thingsboard
This commit is contained in:
		
						commit
						4523ee9d1e
					
				@ -18,6 +18,7 @@ package org.thingsboard.server.service.script;
 | 
				
			|||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
 | 
					import com.fasterxml.jackson.databind.node.ObjectNode;
 | 
				
			||||||
import com.github.benmanes.caffeine.cache.Cache;
 | 
					import com.github.benmanes.caffeine.cache.Cache;
 | 
				
			||||||
import org.junit.Assert;
 | 
					import org.junit.Assert;
 | 
				
			||||||
 | 
					import org.junit.Ignore;
 | 
				
			||||||
import org.junit.jupiter.api.Test;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
import org.springframework.beans.factory.annotation.Value;
 | 
					import org.springframework.beans.factory.annotation.Value;
 | 
				
			||||||
@ -167,6 +168,8 @@ class TbelInvokeServiceTest extends AbstractControllerTest {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Test
 | 
					    @Test
 | 
				
			||||||
 | 
					    @Ignore("This test is based on assumption that Caffeine cache is LRU based but in fact it is based on " +
 | 
				
			||||||
 | 
					            "Tiny LFU which is the cause that the tests fail sometime: https://arxiv.org/pdf/1512.00727.pdf")
 | 
				
			||||||
    public void whenCompiledScriptsCacheIsTooBig_thenRemoveRarelyUsedScripts() throws Exception {
 | 
					    public void whenCompiledScriptsCacheIsTooBig_thenRemoveRarelyUsedScripts() throws Exception {
 | 
				
			||||||
        Map<UUID, String> scriptIdToHash = getFieldValue(invokeService, "scriptIdToHash");
 | 
					        Map<UUID, String> scriptIdToHash = getFieldValue(invokeService, "scriptIdToHash");
 | 
				
			||||||
        Cache<String, Serializable> compiledScriptsCache = getFieldValue(invokeService, "compiledScriptsCache");
 | 
					        Cache<String, Serializable> compiledScriptsCache = getFieldValue(invokeService, "compiledScriptsCache");
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user