Skip to content

Commit

Permalink
Fix for outOfRange test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
soklakov committed Nov 27, 2018
1 parent 63e91a4 commit 9b2ed97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/java/testsuite/x/devapi/CollectionFindTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ public void outOfRange() {
}
try {
this.collection.add("{\"_id\": \"1\"}").execute();
DocResult docs = this.collection.find().fields(expr("{'X':cast(pow(2,63) as signed)+1}")).execute();
DocResult docs = this.collection.find().fields(expr(
mysqlVersionMeetsMinimum(ServerVersion.parseVersion("8.0.13")) ? "{'X':cast(pow(2,63) as signed)+1}" : "{'X':1-cast(pow(2,63) as signed)}"))
.execute();
docs.next(); // we are getting valid data from xplugin before the error, need this call to force the error
fail("Statement should raise an error");
} catch (XProtocolError err) {
Expand Down

0 comments on commit 9b2ed97

Please sign in to comment.