graphaware / neo4j-reco

Neo4j-based recommendation engine module with real-time and pre-computed recommendations.
374 stars 77 forks source link

ModuleIntegrationTest failure when running tests with Java 8 #17

Closed luanne closed 8 years ago

luanne commented 8 years ago

The following two tests in com.graphaware.reco.integration.ModuleIntegrationTest fail: shouldRecommendRealTime and shouldRecommendWithLittleTime because the order of partial scores is different. Example:

Expected :Computed recommendations for Vince: (Adam {total:41.99417, ageDifference:-5.527864, friendsInCommon:{value:27.522034, {value:1.0, name:Jim}, {value:1.0, name:Michal}, {value:25.522034, ParetoTransformationOf:2.0}}, sameGender:10.0, sameLocation:{value:10.0, {value:10.0, location:London}}}), (Luanne {total:7.856705, ageDifference:-7.0093026, friendsInCommon:{value:14.866008, {value:13.866008, ParetoTransformationOf:1.0}, {value:1.0, name:Michal}}})

Actual   :Computed recommendations for Vince: (Adam {total:41.99417, ageDifference:-5.527864, friendsInCommon:{value:27.522034, {value:1.0, name:Jim}, {value:25.522034, ParetoTransformationOf:2.0}, {value:1.0, name:Michal}}, sameGender:10.0, sameLocation:{value:10.0, {value:10.0, location:London}}}), (Luanne {total:7.856705, ageDifference:-7.0093026, friendsInCommon:{value:14.866008, {value:13.866008, ParetoTransformationOf:1.0}, {value:1.0, name:Michal}}})

Happens when running these with Java 8.

ikwattro commented 8 years ago

JsonAssert has been added recently to the framework's dependencies.

We can now use it in the tests instead of string matching

ikwattro commented 8 years ago

Disregard, just saw that the tests are asserting on the string from the Logger.