diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/contexts/ContextManagementTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/contexts/ContextManagementTest.java index 34617b1..9b0670d 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/contexts/ContextManagementTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/contexts/ContextManagementTest.java @@ -22,6 +22,7 @@ import org.gcube.informationsystem.resourceregistry.contexts.security.ContextSec import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext; import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext.PermissionMode; import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext.SecurityType; +import org.gcube.informationsystem.resourceregistry.dbinitialization.DatabaseEnvironment; import org.gcube.informationsystem.resourceregistry.utils.HeaderUtility; import org.gcube.informationsystem.utils.ElementMapper; import org.junit.Assert; @@ -499,6 +500,7 @@ public class ContextManagementTest extends ContextTest { @Test public void testContextCache() throws Exception { + DatabaseEnvironment.initContextCacheRenewal(); List contexts = getAll(); logger.debug("{}", contexts); @@ -513,7 +515,7 @@ public class ContextManagementTest extends ContextTest { IsParentOf isParentOf = c.getParent(); Context parentContext = isParentOf.getSource(); UUID parentUUID = parentContext.getHeader().getUUID(); - Assert.assertEquals(parentContext, contextCache.getContextByUUID(parentUUID)); + Assert.assertTrue(parentContext.getName().compareTo(contextCache.getContextByUUID(parentUUID).getName())==0); List children = parentContext.getChildren(); boolean found = false; for(IsParentOf ipo : children) {