Browse Source

Merge branch 'master' of github.com:thingsboard/thingsboard

pull/8508/head
Igor Kulikov 3 years ago
parent
commit
4523ee9d1e
  1. 3
      application/src/test/java/org/thingsboard/server/service/script/TbelInvokeServiceTest.java

3
application/src/test/java/org/thingsboard/server/service/script/TbelInvokeServiceTest.java

@ -18,6 +18,7 @@ package org.thingsboard.server.service.script;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.github.benmanes.caffeine.cache.Cache;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@ -167,6 +168,8 @@ class TbelInvokeServiceTest extends AbstractControllerTest {
}
@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 {
Map<UUID, String> scriptIdToHash = getFieldValue(invokeService, "scriptIdToHash");
Cache<String, Serializable> compiledScriptsCache = getFieldValue(invokeService, "compiledScriptsCache");

Loading…
Cancel
Save