@Test(dependsOnMethods = "testCreate") public void testMapOfPrimitivesUpdate() throws Exception { AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity()); AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEntity); entitiesInfo.addReferredEntity(tableEntity); //Add a new entry Map<String, String> paramsMap = (Map<String, String>) tableEntity.getAttribute("parametersMap"); paramsMap.put("newParam", "value"); init(); EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); validateMutationResponse(response, EntityMutations.EntityOperation.UPDATE, 1); AtlasEntityHeader updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); //Remove an entry paramsMap.remove("key1"); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); validateMutationResponse(response, EntityMutations.EntityOperation.UPDATE, 1); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); }
@Test(dependsOnMethods = "testCreate") public void testClassUpdate() throws Exception { init(); //Create new db instance final AtlasEntity databaseInstance = TestUtilsV2.createDBEntity(); EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(databaseInstance), false); final AtlasEntityHeader dbCreated = response.getFirstCreatedEntityByTypeName(TestUtilsV2.DATABASE_TYPE); init(); Map<String, AtlasEntity> tableCloneMap = new HashMap<>(); AtlasEntity tableClone = new AtlasEntity(tblEntity.getEntity()); tableClone.setAttribute("database", new AtlasObjectId(dbCreated.getGuid(), TestUtilsV2.DATABASE_TYPE)); tableCloneMap.put(dbCreated.getGuid(), databaseInstance); tableCloneMap.put(tableClone.getGuid(), tableClone); response = entityStore.createOrUpdate(new InMemoryMapEntityStream(tableCloneMap), false); final AtlasEntityHeader tableDefinition = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); AtlasEntity updatedTableDefinition = getEntityFromStore(tableDefinition); Assert.assertNotNull(updatedTableDefinition.getAttribute("database")); Assert.assertEquals(((AtlasObjectId) updatedTableDefinition.getAttribute("database")).getGuid(), dbCreated.getGuid()); }
@Test(dependsOnMethods = "testCreate") public void testClassUpdate() throws Exception { init(); //Create new db instance final AtlasEntity databaseInstance = TestUtilsV2.createDBEntity(); EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(databaseInstance), false); final AtlasEntityHeader dbCreated = response.getFirstCreatedEntityByTypeName(TestUtilsV2.DATABASE_TYPE); init(); Map<String, AtlasEntity> tableCloneMap = new HashMap<>(); AtlasEntity tableClone = new AtlasEntity(tblEntity.getEntity()); tableClone.setAttribute("database", new AtlasObjectId(dbCreated.getGuid(), TestUtilsV2.DATABASE_TYPE)); tableCloneMap.put(dbCreated.getGuid(), databaseInstance); tableCloneMap.put(tableClone.getGuid(), tableClone); response = entityStore.createOrUpdate(new InMemoryMapEntityStream(tableCloneMap), false); final AtlasEntityHeader tableDefinition = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); AtlasEntity updatedTableDefinition = getEntityFromStore(tableDefinition); Assert.assertNotNull(updatedTableDefinition.getAttribute("database")); Assert.assertEquals(((AtlasObjectId) updatedTableDefinition.getAttribute("database")).getGuid(), dbCreated.getGuid()); }
@Test(dependsOnMethods = "testCreate") public void testMapOfPrimitivesUpdate() throws Exception { AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity()); AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEntity); entitiesInfo.addReferredEntity(tableEntity); //Add a new entry Map<String, String> paramsMap = (Map<String, String>) tableEntity.getAttribute("parametersMap"); paramsMap.put("newParam", "value"); init(); EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); validateMutationResponse(response, EntityMutations.EntityOperation.UPDATE, 1); AtlasEntityHeader updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); //Remove an entry paramsMap.remove("key1"); tableEntity.setAttribute("parametersMap", paramsMap); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); validateMutationResponse(response, EntityMutations.EntityOperation.UPDATE, 1); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); }
AtlasEntity firstEntityUpdated = getEntityFromStore(response.getFirstUpdatedEntityByTypeName(TestUtilsV2.DATABASE_TYPE));
AtlasEntityHeader updatedAttrEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_MAP); AtlasEntity updatedFromStore = getEntityFromStore(updatedAttrEntity); validateEntity(attrEntitiesInfo, updatedFromStore); updatedAttrEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_MAP); updatedFromStore = getEntityFromStore(updatedAttrEntity); validateEntity(attrEntitiesInfo, updatedFromStore); updatedAttrEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_MAP); updatedFromStore = getEntityFromStore(updatedAttrEntity); validateEntity(attrEntitiesInfo, updatedFromStore); updatedAttrEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_MAP); updatedFromStore = getEntityFromStore(updatedAttrEntity); validateEntity(attrEntitiesInfo, updatedFromStore); updatedAttrEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_MAP); updatedFromStore = getEntityFromStore(updatedAttrEntity); validateEntity(attrEntitiesInfo, updatedFromStore);
AtlasEntity firstEntityUpdated = getEntityFromStore(response.getFirstUpdatedEntityByTypeName(TestUtilsV2.DATABASE_TYPE));
AtlasEntityHeader updatedAttrEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_MAP); AtlasEntity updatedFromStore = getEntityFromStore(updatedAttrEntity); validateEntity(attrEntitiesInfo, updatedFromStore); updatedAttrEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_MAP); updatedFromStore = getEntityFromStore(updatedAttrEntity); validateEntity(attrEntitiesInfo, updatedFromStore); updatedAttrEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_MAP); updatedFromStore = getEntityFromStore(updatedAttrEntity); validateEntity(attrEntitiesInfo, updatedFromStore); updatedAttrEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_MAP); updatedFromStore = getEntityFromStore(updatedAttrEntity); validateEntity(attrEntitiesInfo, updatedFromStore); updatedAttrEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_MAP); updatedFromStore = getEntityFromStore(updatedAttrEntity); validateEntity(attrEntitiesInfo, updatedFromStore);
AtlasEntityHeader updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); partitions.remove(1); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); partitions.get(0).setAttribute(TestUtilsV2.NAME, "part4"); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable));
AtlasEntityHeader updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("mapOfStructs", structMap); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); complexEntity.setAttribute("mapOfStructs", structMap); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity));
AtlasEntityHeader updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("listOfStructs", structList); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("listOfStructs", structList); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("listOfStructs", structList); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("listOfStructs", structList); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("listOfStructs", structList); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity));
AtlasEntityHeader updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("mapOfStructs", structMap); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); complexEntity.setAttribute("mapOfStructs", structMap); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity));
AtlasEntityHeader updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("listOfStructs", structList); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("listOfStructs", structList); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("listOfStructs", structList); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("listOfStructs", structList); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); complexEntity.setAttribute("listOfStructs", structList); response = entityStore.createOrUpdate(new AtlasEntityStream(complexEntitiesInfo), false); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity));
EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); AtlasEntityHeader updatedTableHeader = response.getFirstUpdatedEntityByTypeName(tableEntity.getTypeName()); validateEntity(entitiesInfo, getEntityFromStore(updatedTableHeader)); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTableHeader = response.getFirstUpdatedEntityByTypeName(tableEntity.getTypeName()); validateEntity(entitiesInfo, getEntityFromStore(updatedTableHeader)); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTableHeader = response.getFirstUpdatedEntityByTypeName(tableEntity.getTypeName()); AtlasEntity updatedEntity = getEntityFromStore(updatedTableHeader); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTableHeader = response.getFirstUpdatedEntityByTypeName(tableEntity.getTypeName()); validateEntity(entitiesInfo, getEntityFromStore(updatedTableHeader)); assertEquals(response.getEntitiesByOperation(EntityMutations.EntityOperation.DELETE).size(), 2);
EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); AtlasEntityHeader updatedTableHeader = response.getFirstUpdatedEntityByTypeName(tableEntity.getTypeName()); validateEntity(entitiesInfo, getEntityFromStore(updatedTableHeader)); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTableHeader = response.getFirstUpdatedEntityByTypeName(tableEntity.getTypeName()); validateEntity(entitiesInfo, getEntityFromStore(updatedTableHeader)); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTableHeader = response.getFirstUpdatedEntityByTypeName(tableEntity.getTypeName()); AtlasEntity updatedEntity = getEntityFromStore(updatedTableHeader); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTableHeader = response.getFirstUpdatedEntityByTypeName(tableEntity.getTypeName()); validateEntity(entitiesInfo, getEntityFromStore(updatedTableHeader)); assertEquals(response.getEntitiesByOperation(EntityMutations.EntityOperation.DELETE).size(), 2);
AtlasEntityHeader updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable));
@Test(dependsOnMethods = "testCreate") public void testStructs() throws Exception { AtlasEntity databaseEntity = dbEntity.getEntity(); AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity()); AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEntity); AtlasStruct serdeInstance = new AtlasStruct(TestUtilsV2.SERDE_TYPE, TestUtilsV2.NAME, "serde1Name"); serdeInstance.setAttribute("serde", "test"); serdeInstance.setAttribute("description", "testDesc"); tableEntity.setAttribute("serde1", serdeInstance); tableEntity.setAttribute("database", new AtlasObjectId(databaseEntity.getTypeName(), TestUtilsV2.NAME, databaseEntity.getAttribute(TestUtilsV2.NAME))); init(); EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); AtlasEntityHeader updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); //update struct attribute serdeInstance.setAttribute("serde", "testUpdated"); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); //set to null tableEntity.setAttribute("description", null); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); Assert.assertNull(updatedTable.getAttribute("description")); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); }
@Test(dependsOnMethods = "testCreate") public void testStructs() throws Exception { AtlasEntity databaseEntity = dbEntity.getEntity(); AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity()); AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEntity); AtlasStruct serdeInstance = new AtlasStruct(TestUtilsV2.SERDE_TYPE, TestUtilsV2.NAME, "serde1Name"); serdeInstance.setAttribute("serde", "test"); serdeInstance.setAttribute("description", "testDesc"); tableEntity.setAttribute("serde1", serdeInstance); tableEntity.setAttribute("database", new AtlasObjectId(databaseEntity.getTypeName(), TestUtilsV2.NAME, databaseEntity.getAttribute(TestUtilsV2.NAME))); init(); EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); AtlasEntityHeader updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); //update struct attribute serdeInstance.setAttribute("serde", "testUpdated"); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); //set to null tableEntity.setAttribute("description", null); init(); response = entityStore.createOrUpdate(new AtlasEntityStream(entitiesInfo), false); updatedTable = response.getFirstUpdatedEntityByTypeName(TABLE_TYPE); Assert.assertNull(updatedTable.getAttribute("description")); validateEntity(entitiesInfo, getEntityFromStore(updatedTable)); }
AtlasEntityHeader updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity));
AtlasEntityHeader updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity)); updatedComplexEntity = response.getFirstUpdatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); validateEntity(complexEntitiesInfo, getEntityFromStore(updatedComplexEntity));