rethinkdb-java icon indicating copy to clipboard operation
rethinkdb-java copied to clipboard

Fix tests failing

Open NotJustAnna opened this issue 4 years ago • 2 comments

This issue tracks the failing generated tests.

MathLogicLogic

~~Appears to happen because of outdated polyglot tests?~~ The error happens because Python.

r.expr(r.expr(True) & r.expr(False) == r.expr(False) | r.expr(True)) seems to be related to a Python-specific behaviour.

Gets translated just fine to r.expr(r.expr(true).and(r.expr(false)).eq(r.expr(false).or(r.expr(true)))) and the test fails because it compiles correctly.

MathLogicBit

Appears to happen because of outdated polyglot tests?

r.expr(-1).bit_sal(54) is evaluated and the result is written as a Double. Jackson will parse it as Double and it'll live as a Double.

A quick fix should be as easy as casting all numbers to double before asserting equality, because Python. I don't know if it's as good as it's easy, though.

Replacing 54 with 53 and recalculating the value should make the test pass.

MutationInsert

The error happens because Python.

'a'*500 is valid in python but invalid in Java.

Polyglot translates to r.mul("a", 500L), which is invalid to RethinkDB.

Fix needs to deal with python scripts, see #11

MetaGrant/ChangefeedsNow

Either badly generated, or polyglot tests are outdated.

ChangefeedsNow is so bad that the generated test was removed from git tree. (It blocks all tests for 2 minutes)

NotJustAnna avatar Mar 05 '20 18:03 NotJustAnna

Tests were deleted by #30, but can be generated by running genTestJava task. Starting now, PRs which break tests (or generates broken ones) won't be accepted.

NotJustAnna avatar Mar 07 '20 12:03 NotJustAnna

@adriantodt What do you think about adding this info to the readme or somewhere and closing this issue? :blush:

gabor-boros avatar May 22 '20 09:05 gabor-boros