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

Test failure with MongoDB 2.6 #6

Open
artourkin opened this issue Sep 3, 2014 · 2 comments
Open

Test failure with MongoDB 2.6 #6

artourkin opened this issue Sep 3, 2014 · 2 comments
Labels

Comments

@artourkin
Copy link

Something wrong happens with ordering of a document stored in a db:

junit.framework.ComparisonFailure: null
Expected :{ "$and" : [ { "$or" : [ { "metadata.mimetype.value" : "applciation/pdf"} , { "metadata.mimetype.value" : "text/html"} , { "metadata.mimetype.value" : "text/xml"}]} , { "metadata.puid.value" : "fmt/42"}]}
Actual :{ "$and" : [ { "metadata.puid.value" : "fmt/42"} , { "$or" : [ { "metadata.mimetype.value" : "applciation/pdf"} , { "metadata.mimetype.value" : "text/html"} , { "metadata.mimetype.value" : "text/xml"}]}]}
at com.petpet.c3po.dao.MongoFilterSerializerTest.shouldTestMongoAndOrFilterSerialization(MongoFilterSerializerTest.java:129)

@artourkin artourkin added the bug label Sep 3, 2014
@peshkira
Copy link

peshkira commented Sep 3, 2014

The test isn't really great also (I am ashamed).

Anyway, could it be that you switched the mongo version and it serialises differently now. Or does it happen always, or is the serialisation indeterministic. Maybe it will be better to do a better comparison instead of the equals comparison. What do you think?

@peshkira
Copy link

peshkira commented Sep 3, 2014

Oh, I just saw the headline (Mongo 2.6). Yes, then it is better to do a more specific comparison instead of String comparison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants