Be more accurate with timeouts and pg_sleep

This commit is contained in:
Daniel García Aubert 2017-07-28 13:21:17 +02:00
parent 33e77a42f2
commit b023a155b7
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ const TestClient = require('../support/test-client');
const pointSleepSql = ` const pointSleepSql = `
SELECT SELECT
pg_sleep(1), pg_sleep(0.5),
'SRID=3857;POINT(0 0)'::geometry the_geom_webmercator, 'SRID=3857;POINT(0 0)'::geometry the_geom_webmercator,
1 cartodb_id, 1 cartodb_id,
2 val 2 val
@ -55,7 +55,7 @@ const createMapConfig = ({
describe('user database timeout limit', function () { describe('user database timeout limit', function () {
beforeEach(function (done) { beforeEach(function (done) {
TestClient.setUserDatabaseTimeoutLimit('localhost', 50, done); TestClient.setUserDatabaseTimeoutLimit('localhost', 300, done);
}); });
afterEach(function (done) { afterEach(function (done) {

View File

@ -16,7 +16,7 @@ const pointSleepSql = `
// during instatiation we validate tile 30/0/0, creating a point in that tile `pg_sleep` will throw a timeout // during instatiation we validate tile 30/0/0, creating a point in that tile `pg_sleep` will throw a timeout
const validationPointSleepSql = ` const validationPointSleepSql = `
SELECT SELECT
pg_sleep(1), pg_sleep(0.5),
ST_Transform('SRID=4326;POINT(-180 85.05112877)'::geometry, 3857) the_geom_webmercator, ST_Transform('SRID=4326;POINT(-180 85.05112877)'::geometry, 3857) the_geom_webmercator,
1 cartodb_id, 1 cartodb_id,
2 val 2 val