Add kind of meaningful test for latency

This commit is contained in:
Rafa de la Torre 2019-11-12 12:59:36 +01:00
parent 8c7a75dd0c
commit e14c49b223
2 changed files with 5 additions and 1 deletions

View File

@ -58,7 +58,8 @@ SELECT '1.5', cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback') @>
SELECT '1.6', cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback') @> '{"server_options": {"host": "localhost", "port": "@@PGPORT@@", "updatable": "false", "extensions": "postgis", "fetch_size": "1000", "use_remote_estimate": "true"}}'::jsonb;
\echo '%% It returns the network latency to the remote server'
SELECT '1.7', cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback') @> '{"server_latency": 0.0}'::jsonb;
SELECT '1.7', (cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback')->'server_latency')::float > 0.0;
SELECT '1.8', (cartodb.CDB_Federated_Server_Diagnostics(server => 'loopback')->'server_latency')::float < 1000.0;
-- ===================================================================

View File

@ -11,4 +11,7 @@ ERROR: Server "doesNotExist" does not exist
1.5|t
%% It returns the remote server options
1.6|t
%% It returns the network latency to the remote server
1.7|t
1.8|t
D1|