Fixed test

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@134839 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-11-25 15:41:22 +00:00
parent 0bb59cb6c2
commit 62553c1bf5
1 changed files with 5 additions and 3 deletions

View File

@ -151,6 +151,7 @@ public class SmartgearResourcesTest {
ContainerStateFacet containerStateFacet = getContainerStateFacet(null);
hostingNode.addFacet(containerStateFacet);
MemoryFacet ramFacet = getRamInfo(null);
HasVolatileMemory<HostingNode, MemoryFacet> hasVolatileRAMMemory =
@ -180,11 +181,13 @@ public class SmartgearResourcesTest {
List<ConsistsOf<? extends Resource, ? extends Facet>> consistsOfList = hostingNodeToUpdate.getConsistsOf();
for(ConsistsOf<? extends Resource, ? extends Facet> c : consistsOfList){
if(c.getTarget() instanceof ContainerStateFacet){
containerStateFacet = (ContainerStateFacet) c.getTarget();
containerStateFacet = getContainerStateFacet(containerStateFacet);
continue;
}
if(c instanceof HasVolatileMemory){
String memoryType = (String) c.getAdditionalProperty(MEMORY_TYPE);
@ -217,10 +220,9 @@ public class SmartgearResourcesTest {
String updatedHN = entityManagementImpl.updateResource(uuid, Entities.marshal(hostingNodeToUpdate));
logger.debug("Updated {}", updatedHN);
updatedHN = entityManagementImpl.readResource(uuid, HostingNode.NAME);
HostingNode hostingNodeToUpdated = Entities.unmarshal(HostingNode.class, updatedHN);
logger.debug("Upodate Hosting Node {}", hostingNodeToUpdated);
}