From 43674b7f29d5a7028c2da3b2a1142edb2dc2f017 Mon Sep 17 00:00:00 2001 From: Andrii Shvaika Date: Mon, 8 May 2023 18:45:07 +0300 Subject: [PATCH] Ignore a flaky test that is based on wrong cache strategy --- .../server/service/script/TbelInvokeServiceTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/src/test/java/org/thingsboard/server/service/script/TbelInvokeServiceTest.java b/application/src/test/java/org/thingsboard/server/service/script/TbelInvokeServiceTest.java index e0d1766d44..ca5dbef5f1 100644 --- a/application/src/test/java/org/thingsboard/server/service/script/TbelInvokeServiceTest.java +++ b/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 scriptIdToHash = getFieldValue(invokeService, "scriptIdToHash"); Cache compiledScriptsCache = getFieldValue(invokeService, "compiledScriptsCache");