File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/test/java/com/force/i18n/grammar/parser Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -553,7 +553,6 @@ public void testCacheConfig() throws InterruptedException {
553553
554554 GrammaticalLabelSetLoader loader = new GrammaticalLabelSetLoader (config );
555555 loader .getSet (ENGLISH );
556-
557556 Thread .sleep (1 );
558557 assertNull (loader .getCache ().getIfPresent (desc ));
559558
@@ -569,21 +568,25 @@ public void testCacheConfig() throws InterruptedException {
569568 assertEquals (0 , loader .getCache ().size ());
570569
571570 loader .getSet (ENGLISH );
571+ Thread .sleep (1 );
572572 assertEquals (1 , loader .getCache ().size ());
573573
574574 loader .getSet (ENGLISH_AU );
575+ Thread .sleep (1 );
575576 assertEquals (3 , loader .getCache ().size ());
576577 assertNotNull (loader .getCache ().getIfPresent (desc ));
577578 assertNotNull (loader .getCache ().getIfPresent (desc .getForOtherLanguage (ENGLISH_GB )));
578579 assertNotNull (loader .getCache ().getIfPresent (desc .getForOtherLanguage (ENGLISH_AU )));
579580
580581 // Caffeine does not evict prior the threadshold, but after the size crossed
581582 loader .getSet (FRENCH );
582- assertEquals (4 , loader .getCache ().size ());
583+ Thread .sleep (1 );
584+ assertEquals (3 , loader .getCache ().size ());
583585 assertNotNull (loader .getCache ().getIfPresent (desc .getForOtherLanguage (FRENCH )));
584586
585587 loader .getSet (GERMAN );
586- assertEquals (4 , loader .getCache ().size ());
588+ Thread .sleep (1 );
589+ assertEquals (3 , loader .getCache ().size ());
587590 assertNotNull (loader .getCache ().getIfPresent (desc .getForOtherLanguage (GERMAN )));
588591 }
589592}
You can’t perform that action at this time.
0 commit comments