diff --git a/test/CDB_SyncTableTest.sql b/test/CDB_SyncTableTest.sql index 694daee..b8790b2 100644 --- a/test/CDB_SyncTableTest.sql +++ b/test/CDB_SyncTableTest.sql @@ -1,5 +1,6 @@ -- Setup: create and populate a table to test the syncs \set QUIET on +BEGIN; SET client_min_messages TO error; CREATE TABLE test_sync_source ( cartodb_id bigint, @@ -15,6 +16,7 @@ INSERT INTO test_sync_source VALUES SET client_min_messages TO notice; \set QUIET off + \echo 'First table sync: it should be simply just copied to the destination' SELECT cartodb.CDB_SyncTable('test_sync_source', 'public', 'test_sync_dest'); @@ -37,8 +39,6 @@ SELECT cartodb.CDB_SyncTable('test_sync_source', 'public', 'test_sync_dest'); SELECT * FROM test_sync_source ORDER BY cartodb_id; SELECT * FROM test_sync_dest ORDER BY cartodb_id; + -- Cleanup -\set QUIET on -DROP TABLE IF EXISTS test_sync_source; -DROP TABLE IF EXISTS test_sync_dest; -\set QUIET off +ROLLBACK; diff --git a/test/CDB_SyncTableTest_expect b/test/CDB_SyncTableTest_expect index c4dc3dd..5973f7d 100644 --- a/test/CDB_SyncTableTest_expect +++ b/test/CDB_SyncTableTest_expect @@ -37,3 +37,4 @@ Sanity check: the end result is the same source table 2|2|2|bar 4|4|4|cantaloupe 5|5|5|sandia +ROLLBACK