You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2019/07/17 07:48:42 UTC
[atlas] branch master updated: ATLAS-3067: updated
EntityJerseyResourceIT.testUTF8() to aid troubleshooting failures - #2
This is an automated email from the ASF dual-hosted git repository.
madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new d52369e ATLAS-3067: updated EntityJerseyResourceIT.testUTF8() to aid troubleshooting failures - #2
d52369e is described below
commit d52369ef11adce09a2585777cdda39dca447d202
Author: Madhan Neethiraj <ma...@apache.org>
AuthorDate: Tue Jul 16 13:17:33 2019 -0700
ATLAS-3067: updated EntityJerseyResourceIT.testUTF8() to aid troubleshooting failures - #2
---
.../atlas/web/integration/EntityJerseyResourceIT.java | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java
index 70775b3..767278e 100755
--- a/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java
@@ -833,13 +833,14 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
Collections.singletonList(classTypeDefinition));
createType(typesDef);
- Referenceable instance = new Referenceable(classType);
- instance.set(attrName, attrValue);
- Id guid = createInstance(instance);
-
- ObjectNode response = atlasClientV1.callAPIWithBodyAndParams(AtlasClient.API_V1.GET_ENTITY, null, guid._getId());
- Referenceable getReferenceable = AtlasType.fromV1Json(AtlasType.toJson(response.get(AtlasClient.DEFINITION)), Referenceable.class);
- Assert.assertEquals(getReferenceable.get(attrName), attrValue);
+ Referenceable instance = new Referenceable(classType, Collections.singletonMap(attrName, attrValue));
+ Id guid = createInstance(instance);
+ ObjectNode response = atlasClientV1.callAPIWithBodyAndParams(AtlasClient.API_V1.GET_ENTITY, null, guid._getId());
+ Object objResponse = response.get(AtlasClient.DEFINITION);
+ String jsonResponse = AtlasType.toJson(objResponse);
+ Referenceable createdEntity = AtlasType.fromV1Json(jsonResponse, Referenceable.class);
+
+ Assert.assertEquals(createdEntity.get(attrName), attrValue, "entityId=" + guid + "; objResponse=" + objResponse + "; jsonResponse=" + jsonResponse + "; createdEntity=" + createdEntity);
}