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

Schema validation : support for LinkBag (min, max) #6106

Merged
merged 1 commit into from Oct 11, 2016
Merged

Schema validation : support for LinkBag (min, max) #6106

merged 1 commit into from Oct 11, 2016

Conversation

voondo
Copy link
Contributor

@voondo voondo commented May 9, 2016

No description provided.

@tglman
Copy link
Member

tglman commented May 27, 2016

hi @voondo,

The code look ok, but there is no test case that actually prove that it work, will be cool have some.

@voondo
Copy link
Contributor Author

voondo commented Jun 3, 2016

Ok I'll provide it asap.

@voondo
Copy link
Contributor Author

voondo commented Oct 7, 2016

Here is a new commit with the tests.
However, they fail with:

testMinValidation on testMinValidation(com.orientechnologies.orient.core.record.impl.ODocumentValidationTest)(com.orientechnologies.orient.core.record.impl.ODocumentValidationTest)  Time elapsed: 0.077 sec  <<< FAILURE!
com.orientechnologies.orient.core.exception.ORecordNotFoundException: 
The record with id '#40:50' was not found
        DB name="ODocumentValidationTest"
        at com.orientechnologies.orient.core.record.impl.ODocumentValidationTest.checkField(ODocumentValidationTest.java:769)
        at com.orientechnologies.orient.core.record.impl.ODocumentValidationTest.testMinValidation(ODocumentValidationTest.java:483)
Caused by: java.lang.IllegalArgumentException: Cluster segment #40 does not exist in database 'ODocumentValidationTest'
        at com.orientechnologies.orient.core.record.impl.ODocumentValidationTest.checkField(ODocumentValidationTest.java:769)
        at com.orientechnologies.orient.core.record.impl.ODocumentValidationTest.testMinValidation(ODocumentValidationTest.java:483)

testMaxValidation on testMaxValidation(com.orientechnologies.orient.core.record.impl.ODocumentValidationTest)(com.orientechnologies.orient.core.record.impl.ODocumentValidationTest)  Time elapsed: 0.068 sec  <<< FAILURE!
com.orientechnologies.orient.core.exception.ORecordNotFoundException: 
The record with id '#40:30' was not found
        DB name="ODocumentValidationTest"
        at com.orientechnologies.orient.core.record.impl.ODocumentValidationTest.checkField(ODocumentValidationTest.java:769)
        at com.orientechnologies.orient.core.record.impl.ODocumentValidationTest.testMaxValidation(ODocumentValidationTest.java:368)
Caused by: java.lang.IllegalArgumentException: Cluster segment #40 does not exist in database 'ODocumentValidationTest'
        at com.orientechnologies.orient.core.record.impl.ODocumentValidationTest.checkField(ODocumentValidationTest.java:769)
        at com.orientechnologies.orient.core.record.impl.ODocumentValidationTest.testMaxValidation(ODocumentValidationTest.java:368)

But I don't understand why because I've done like linklist... Maybe could it be obvious for you ?

Also I didn't succeed to run a single test with maven. I tried thins like mvn -Dtest=ODocumentValidationTest test but it doesn't work. Any clue ?

@tglman
Copy link
Member

tglman commented Oct 11, 2016

hi @voondo,

That's error is because some lazy load has been tiggered, i'll double check your code and let you know.

That's why i asked for test :D

@voondo
Copy link
Contributor Author

voondo commented Oct 11, 2016

Actually it's not very clear to me. I just wanted to add such constraints on createEdgeProperty.
It worked during the 2.2-beta but for an other reason, I no longer use them for now so I cannot tell more...

@tglman
Copy link
Member

tglman commented Oct 11, 2016

fixed, the cause, merging this on develop.

@tglman tglman merged commit 1ef8b8c into orientechnologies:develop Oct 11, 2016
@voondo voondo deleted the schema-validation-link-bag branch October 12, 2016 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants