Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

r.js() control.yaml tests are broken #43

Open
CMogilko opened this issue Oct 6, 2018 · 2 comments
Open

r.js() control.yaml tests are broken #43

CMogilko opened this issue Oct 6, 2018 · 2 comments
Assignees

Comments

@CMogilko
Copy link
Member

CMogilko commented Oct 6, 2018

Golang driver uses converted yaml tests to check integration with server. So I encountered test failures with rethinkdb build from this repo. With old rethinkdb-legacy it passes.
Rethinkdb built from next branch fails on https://github.com/rethinkdb/rethinkdb/blob/next/test/rql_test/src/control.yaml tests:

  • r.js('function() { return 1; }') expected SyntaxError: Unexpected token ( got SyntaxError: function name required (line 1)
  • r.do(1, 2, r.js('(function(a, b, c) { return c; })')) expected Cannot convert javascript undefined to ql::datum_t. got ""
  • r.expr([1, 2, 3]).filter(r.js('(function(a) {})')) expected Cannot convert javascript undefined to ql::datum_t. got '"
@CMogilko
Copy link
Member Author

CMogilko commented Oct 6, 2018

times/constructors.yaml:

  • r.epochTime(253430000000).year() returns error instead of 10000
  • r.epochTime(-17990000000).year() expected Error in time logic: Year is out of valid range: 1400..10000. got Error in time logic: Year is out of valid range: 1400..9999.

times/time_arith.yaml:

  • r.do(r.epochTime(1.375147296681e+09), r.js("(function(data){return data})")).toEpochTime() returns error instead of 1375147296.681
  • r.do(r.js('new Date(\'2012-08-01\')')).toISO8601() returns error instead of 2012-08-01T00:00:00+00:00
  • r.do(r.js('(function(x){doc = new Object(); doc.date = new Date(\'2012-08-01\'); return doc;})'))('date').toISO8601() returns error instead of 2012-08-01T00:00:00+00:00

@asakatida
Copy link
Contributor

This seems related to the Duktape migration #5.

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

No branches or pull requests

2 participants