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

David Radley commented on ATLAS-1311:
-------------------------------------

I have raised a review comment. when I run this tests in Eclipse I see 6 
errors. 

For one of the errors I put out the Exception stack trace. It is 
org.apache.atlas.exception.AtlasBaseException: Cardinality of attribute 
testStructDef-2.invalidAttributeDef requires a list or set type
        at 
org.apache.atlas.type.AtlasStructType.resolveReferences(AtlasStructType.java:116)
        at 
org.apache.atlas.type.AtlasTypeRegistry$AtlasTransientTypeRegistry.resolveReferences(AtlasTypeRegistry.java:285)
        at 
org.apache.atlas.type.AtlasTypeRegistry$AtlasTransientTypeRegistry.addType(AtlasTypeRegistry.java:297)
        at 
org.apache.atlas.model.ModelTestUtil.newStructDef(ModelTestUtil.java:193)
        at 
org.apache.atlas.model.ModelTestUtil.newStructDef(ModelTestUtil.java:178)
        at 
org.apache.atlas.model.typedef.TestAtlasStructDef.testStructDefAddAttribute(TestAtlasStructDef.java:69)

The first thing I notice is that the message and its inserts are not properly 
formatted.

The main issue appears to be in newAttributeDefsWithAllBuiltInTypes. I notice 
that it calls getRandomBuiltInType() - so it gets a random type based 
ThreadLocalRandom.current(). This makes the unit tests non-deterministic, with 
me seeing errors and you not. I suggest testing all types combinations in this 
method to ensure they work.  

 

> Integration tests for Entity V2 REST APIs
> -----------------------------------------
>
>                 Key: ATLAS-1311
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1311
>             Project: Atlas
>          Issue Type: Improvement
>    Affects Versions: 0.8-incubating
>            Reporter: Apoorv Naik
>            Assignee: Apoorv Naik
>             Fix For: 0.8-incubating
>
>         Attachments: ATLAS-1311-v2.patch, ATLAS-1311-v3.patch, 
> ATLAS-1311.patch, ATLAS-1311.v4.patch, ATLAS-1311.v5.patch, 
> ATLAS-1311.v6.patch, ATLAS-1311.v7.patch
>
>
> Currently there's no IT for the new REST API.



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

Reply via email to