We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 175b688 commit 64eb77eCopy full SHA for 64eb77e
test/integration/client/statement_timeout-tests.js
@@ -59,4 +59,19 @@ if (!helper.args.native) { // statement_timeout is not supported with the native
59
done()
60
})
61
62
+
63
+ suite.test('statement_timeout actually cancels long running queries', function (done) {
64
+ var conf = getConInfo({
65
+ 'statement_timeout': '10' // 10ms to keep tests running fast
66
+ })
67
+ var client = new Client(conf)
68
+ client.connect(assert.success(function () {
69
+ client.query('SELECT pg_sleep( 1 )', function ( error ) {
70
+ client.end()
71
+ assert.strictEqual( error.code, '57014' ) // query_cancelled
72
+ done()
73
74
+ }))
75
76
77
}
0 commit comments