diff --git a/test/acceptance/multilayer.js b/test/acceptance/multilayer.js index aff420d4..3b459ce6 100644 --- a/test/acceptance/multilayer.js +++ b/test/acceptance/multilayer.js @@ -24,8 +24,6 @@ server.setMaxListeners(0); [true, false].forEach(function(cdbQueryTablesFromPostgresEnabledValue) { -global.environment.enabledFeatures = {cdbQueryTablesFromPostgres: cdbQueryTablesFromPostgresEnabledValue}; - suite('multilayer:postgres=' + cdbQueryTablesFromPostgresEnabledValue, function() { var redis_client = redis.createClient(global.environment.redis.port); @@ -38,6 +36,7 @@ suite('multilayer:postgres=' + cdbQueryTablesFromPostgresEnabledValue, function( var test_database = test_user + '_db'; suiteSetup(function(done){ + global.environment.enabledFeatures = { cdbQueryTablesFromPostgres: cdbQueryTablesFromPostgresEnabledValue }; sqlapi_server = new SQLAPIEmu(global.environment.sqlapi.port, done); }); diff --git a/test/acceptance/server.js b/test/acceptance/server.js index a2e2324e..71a8ba58 100644 --- a/test/acceptance/server.js +++ b/test/acceptance/server.js @@ -20,10 +20,7 @@ server.setMaxListeners(0); [true, false].forEach(function(cdbQueryTablesFromPostgresEnabledValue) { -global.environment.enabledFeatures = {cdbQueryTablesFromPostgres: cdbQueryTablesFromPostgresEnabledValue}; - -suite('multilayer:postgres=' + cdbQueryTablesFromPostgresEnabledValue, function() { - +suite('server:postgres=' + cdbQueryTablesFromPostgresEnabledValue, function() { var redis_client = redis.createClient(global.environment.redis.port); var sqlapi_server; @@ -47,8 +44,9 @@ suite('multilayer:postgres=' + cdbQueryTablesFromPostgresEnabledValue, function( // A couple of styles to use during testing var test_style_black_200 = "#test_table{marker-fill:black;marker-line-color:red;marker-width:10}"; var test_style_black_210 = "#test_table{marker-fill:black;marker-line-color:red;marker-width:20}"; - + suiteSetup(function(done){ + global.environment.enabledFeatures = { cdbQueryTablesFromPostgres: cdbQueryTablesFromPostgresEnabledValue }; sqlapi_server = new SQLAPIEmu(global.environment.sqlapi.port, done); }); diff --git a/test/acceptance/templates.js b/test/acceptance/templates.js index 46c872e2..f0df7414 100644 --- a/test/acceptance/templates.js +++ b/test/acceptance/templates.js @@ -27,9 +27,8 @@ server.setMaxListeners(0); [true, false].forEach(function(cdbQueryTablesFromPostgresEnabledValue) { -global.environment.enabledFeatures = {cdbQueryTablesFromPostgres: cdbQueryTablesFromPostgresEnabledValue}; - suite('template_api:postgres=' + cdbQueryTablesFromPostgresEnabledValue, function() { + serverOptions.channelCache = {}; var redis_client = redis.createClient(global.environment.redis.port); var sqlapi_server; @@ -37,6 +36,7 @@ suite('template_api:postgres=' + cdbQueryTablesFromPostgresEnabledValue, functio var expected_last_updated = new Date(expected_last_updated_epoch).toISOString(); suiteSetup(function(done){ + global.environment.enabledFeatures = { cdbQueryTablesFromPostgres: cdbQueryTablesFromPostgresEnabledValue }; sqlapi_server = new SQLAPIEmu(global.environment.sqlapi.port, done); // TODO: check redis is clean ? });