diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-11-02 07:05:11 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-11-02 07:05:11 -0700 |
commit | 4e88c80a22b6ca982341413ee806ade0df57b4b7 (patch) | |
tree | 82c2daaac597f74595bc83c18646280a56898e1a /ext/librethinkdbxx/test/upstream/timeout.yaml | |
parent | a6203ed0389c1b995ebe94935b2d1ddeb01f36ee (diff) | |
download | infinitytier-4e88c80a22b6ca982341413ee806ade0df57b4b7.tar.gz infinitytier-4e88c80a22b6ca982341413ee806ade0df57b4b7.zip |
RethinkDB native connector work, minor fixes.
Diffstat (limited to 'ext/librethinkdbxx/test/upstream/timeout.yaml')
-rw-r--r-- | ext/librethinkdbxx/test/upstream/timeout.yaml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ext/librethinkdbxx/test/upstream/timeout.yaml b/ext/librethinkdbxx/test/upstream/timeout.yaml new file mode 100644 index 00000000..e162b81a --- /dev/null +++ b/ext/librethinkdbxx/test/upstream/timeout.yaml @@ -0,0 +1,39 @@ +desc: Tests timeouts. +tests: + # js timeout tests + # Should timeout after the default of 5 seconds + - cd: r.js('while(true) {}') + ot: err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 5.000 seconds.", [0]) + + - py: r.js('while(true) {}', timeout=1.3) + js: r.js('while(true) {}', {timeout:1.3}) + rb: r.js('while(true) {}', :timeout => 1.3) + ot: err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 1.300 seconds.", [0]) + + - py: r.js('while(true) {}', timeout=8) + js: r.js('while(true) {}', {timeout:8}) + rb: r.js('while(true) {}', :timeout => 8) + ot: err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 8.000 seconds.", [0]) + + - cd: r.expr('foo').do(r.js('(function(x) { while(true) {} })')) + ot: err("ReqlQueryLogicError", "JavaScript query `(function(x) { while(true) {} })` timed out after 5.000 seconds.", [0]) + + - py: r.expr('foo').do(r.js('(function(x) { while(true) {} })', timeout=1.3)) + js: r.expr('foo').do(r.js('(function(x) { while(true) {} })', {timeout:1.3})) + rb: r.expr('foo').do(r.js('(function(x) { while(true) {} })', :timeout => 1.3)) + ot: err("ReqlQueryLogicError", "JavaScript query `(function(x) { while(true) {} })` timed out after 1.300 seconds.", [0]) + + - py: r.expr('foo').do(r.js('(function(x) { while(true) {} })', timeout=8)) + js: r.expr('foo').do(r.js('(function(x) { while(true) {} })', {timeout:8})) + rb: r.expr('foo').do(r.js('(function(x) { while(true) {} })', :timeout => 8)) + ot: err("ReqlQueryLogicError", "JavaScript query `(function(x) { while(true) {} })` timed out after 8.000 seconds.", [0]) + + # http timeout tests + - py: r.http('httpbin.org/delay/10', timeout=0.8) + js: r.http('httpbin.org/delay/10', {timeout:0.8}) + rb: r.http('httpbin.org/delay/10', {:timeout => 0.8}) + ot: err("ReqlNonExistenceError", "Error in HTTP GET of `httpbin.org/delay/10`:" + " timed out after 0.800 seconds.", []) + - py: r.http('httpbin.org/delay/10', method='PUT', timeout=0.0) + js: r.http('httpbin.org/delay/10', {method:'PUT', timeout:0.0}) + rb: r.http('httpbin.org/delay/10', {:method => 'PUT', :timeout => 0.0}) + ot: err("ReqlNonExistenceError", "Error in HTTP PUT of `httpbin.org/delay/10`:" + " timed out after 0.000 seconds.", []) |