You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Nigel Jones (JIRA)" <ji...@apache.org> on 2016/09/28 07:50:21 UTC

[jira] [Commented] (ATLAS-1102) DefaultMetadataServiceTest can fail in json string comparison

    [ https://issues.apache.org/jira/browse/ATLAS-1102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15528767#comment-15528767 ] 

Nigel Jones commented on ATLAS-1102:
------------------------------------

I just hit this same issue -- with the values for the type reversed

> DefaultMetadataServiceTest can fail in json string comparison
> -------------------------------------------------------------
>
>                 Key: ATLAS-1102
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1102
>             Project: Atlas
>          Issue Type: Bug
>            Reporter: David Kantor
>            Priority: Minor
>
> When running build on a Linux VM, I observed DefaultMetadataServiceTest failing when doing a comparison of json strings serialized from Reference instances.  The objects are equivalent but the attributes are serialized in a different order.
> {noformat}
> DefaultMetadataServiceTest.testSpecialCharacters:231->assertReferenceableEquals:251 expected:<{
>   "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>   "id":{
>     "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>     "id":"-3902865145221408",
>     "version":0,
>     "typeName":"C23uFuNbhg\"${}%",
>     "state":"ACTIVE"
>   },
>   "typeName":"C23uFuNbhg\"${}%",
>   "values":{
>     "pSXqnaPYeh\"${}%":"DYm4diYqog\"${}%",
>     "ectzWlqBQt\"${}%":[
>       "rxstQGf9Ym\"${}%"
>     ],
>     "D9fOcAp4M5\"${}%":{
>       "sNZLOZhnno\"${}%":"aqhsYeSqwn\"${}%"
>     }
>   },
>   "traitNames":[
>   ],
>   "traits":{
>   }
> }> but was:<{
>   "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>   "id":{
>     "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>     "id":"-3902865145221408",
>     "version":0,
>     "typeName":"C23uFuNbhg\"${}%",
>     "state":"ACTIVE"
>   },
>   "typeName":"C23uFuNbhg\"${}%",
>   "values":{
>     "ectzWlqBQt\"${}%":[
>       "rxstQGf9Ym\"${}%"
>     ],
>     "pSXqnaPYeh\"${}%":"DYm4diYqog\"${}%",
>     "D9fOcAp4M5\"${}%":{
>       "sNZLOZhnno\"${}%":"aqhsYeSqwn\"${}%"
>     }
>   },
>   "traitNames":[
>   ],
>   "traits":{
>   }
> }>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)