Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATLAS-3041 : Fix for Cannot delete relationship types using the /typedef/name REST API #27

Closed
wants to merge 1 commit into from

Conversation

aadarshjajodia
Copy link
Contributor

…/typedef/name REST API

Since the AtlasRelationshipDef is extending AtlasStructDef, we make an additonal
check in deleteByName before the AtlasStructDef check to see if the instance to be
deleted is of type AtlasRelationshipDef.

@aadarshjajodia aadarshjajodia changed the title ATLAS-3041 : Fix for Cannot delete relationship types using the types… ATLAS-3041 : Fix for Cannot delete relationship types using the /typedef/name REST API Mar 11, 2019
@mneethiraj
Copy link
Contributor

@aadarshjajodia - can you look into the following unit-test failure? This is likely caused by the two new types added in this patch - cluster and host. Perhaps deleteTypeByName() should be updated to delete these types as well (along with other types)?

Tests run: 17, Failures: 1, Errors: 0, Skipped: 15, Time elapsed: 48.052 sec <<< FAILURE! - in org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStoreTest

testGet(org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStoreTest) Time elapsed: 0.026 sec <<< FAILURE!
java.lang.AssertionError: expected [0] but found [2]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:496)
at org.testng.Assert.assertEquals(Assert.java:125)
at org.testng.Assert.assertEquals(Assert.java:372)
at org.testng.Assert.assertEquals(Assert.java:382)
at org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStoreTest.testGet(AtlasTypeDefGraphStoreTest.java:87)

…/typedef/name REST API

Since the AtlasRelationshipDef is extending AtlasStructDef, we make an additonal
check in deleteByName before the AtlasStructDef check to see if the instance to be
deleted is of type AtlasRelationshipDef.
@aadarshjajodia
Copy link
Contributor Author

@mneethiraj please review. I have updated the pull request.

@mneethiraj
Copy link
Contributor

@aadarshjajodia - the updates look good. Please confirm that UTs pass successfully (mvn clean package).

@aadarshjajodia
Copy link
Contributor Author

@mneethiraj ran mvn clean package on the atlas home dir. It passed all the tests. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants