saksenasonali commented on code in PR #662:
URL: https://github.com/apache/atlas/pull/662#discussion_r3400937011
##########
repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java:
##########
@@ -364,21 +364,18 @@ public void importGlossary(InputStream inputStream)
throws IOException, AtlasBas
assertEntityCount("AtlasGlossaryTerm",
"105533b6-c125-4a87-bed5-cdf67fb68c39", 1);
}
- @Test(dataProvider = "hdfs_path1", expectedExceptions =
AtlasBaseException.class)
+ @Test(dataProvider = "hdfs_path1")
public void importHdfs_path1(InputStream inputStream) throws IOException,
AtlasBaseException {
loadBaseModel();
loadFsModel();
loadModelFromResourcesJson("tag1.json", typeDefStore, typeRegistry);
- try {
- runImportWithNoParameters(importService, inputStream);
- } catch (AtlasBaseException e) {
- assertEquals(e.getAtlasErrorCode(),
AtlasErrorCode.INVALID_IMPORT_ATTRIBUTE_TYPE_CHANGED);
- AtlasClassificationType tag1 =
typeRegistry.getClassificationTypeByName("tag1");
- assertNotNull(tag1);
- assertEquals(tag1.getAllAttributes().size(), 2);
- throw e;
- }
+ runImportWithNoParameters(importService, inputStream);
+
+ AtlasClassificationType tag1 =
typeRegistry.getClassificationTypeByName("tag1");
+ assertNotNull(tag1);
+
assertEquals(tag1.getAttribute("attrib1").getAttributeDef().getTypeName(),
"string");
+ assertNotNull(tag1.getAttribute("attrib2"));
Review Comment:
tag1.json is the pre-existing typedef (attrib1/date, attrib3/int).
hdfs_path1.zip imports tag1 with attrib1/string and attrib2/int. The test
verifies the type change on attrib1 and that attrib2 from the import is added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]