Remove py_sleep test
I think this was added for historical reasons when upstream plpython was not interrumpible, but that's not the case anymore. Right now, either we adapt it to use plpython2u or plpython3u depending on what's available, or we just remove it since upstream was fixed several years ago. It's simpler to remove it
This commit is contained in:
parent
138307dc18
commit
349c4d72c4
@ -860,30 +860,6 @@ describe('app.test', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('GET with slow python script exceeding statement timeout returns proper error message', function (done) {
|
|
||||||
assert.response(server, {
|
|
||||||
url: '/api/v1/sql?q=select%20py_sleep(2.1)',
|
|
||||||
headers: { host: 'vizzuality.cartodb.com' },
|
|
||||||
method: 'GET'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// status: 429, ---> Both 200 and 429 are valid
|
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/json; charset=utf-8'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
function (err, res) {
|
|
||||||
assert.ifError(err);
|
|
||||||
var error = JSON.parse(res.body);
|
|
||||||
assert.deepStrictEqual(error.error, [
|
|
||||||
'You are over platform\'s limits: SQL query timeout error.' +
|
|
||||||
' Refactor your query before running again or contact CARTO support for more details.'
|
|
||||||
]);
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('too large rows get into error log', function (done) {
|
it('too large rows get into error log', function (done) {
|
||||||
var dbMaxRowSize = global.settings.db_max_row_size;
|
var dbMaxRowSize = global.settings.db_max_row_size;
|
||||||
global.settings.db_max_row_size = 4;
|
global.settings.db_max_row_size = 4;
|
||||||
|
@ -55,7 +55,6 @@ async function populateDatabase () {
|
|||||||
const filenames = [
|
const filenames = [
|
||||||
'test',
|
'test',
|
||||||
'populated_places_simple_reduced',
|
'populated_places_simple_reduced',
|
||||||
'py_sleep',
|
|
||||||
'quota_mock'
|
'quota_mock'
|
||||||
].map(filename => `${__dirname}/support/sql/${filename}.sql`);
|
].map(filename => `${__dirname}/support/sql/${filename}.sql`);
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
CREATE OR REPLACE FUNCTION py_sleep(t FLOAT8)
|
|
||||||
RETURNS void AS $$
|
|
||||||
import time
|
|
||||||
time.sleep(t)
|
|
||||||
$$ LANGUAGE plpythonu;
|
|
Loading…
Reference in New Issue
Block a user