This is an automated email from the ASF dual-hosted git repository.
madhan pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new dd31322 ATLAS-3067: updated EntityJerseyResourceIT.testUTF8() to aid
troubleshooting failures - #2
dd31322 is described below
commit dd31322733c2cea72519b5c2fdc85a3c373c7d10
Author: Madhan Neethiraj <[email protected]>
AuthorDate: Tue Jul 16 13:17:33 2019 -0700
ATLAS-3067: updated EntityJerseyResourceIT.testUTF8() to aid
troubleshooting failures - #2
(cherry picked from commit d52369ef11adce09a2585777cdda39dca447d202)
---
.../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);
}