citusdata / pg_shard

ATTENTION: pg_shard is superseded by Citus, its more powerful replacement
https://github.com/citusdata/citus
GNU Lesser General Public License v3.0
1.06k stars 63 forks source link

Makefile is updated to fix regression test failures on Redhat / Fedora #148

Closed onderkalaci closed 8 years ago

onderkalaci commented 8 years ago

On redhat/fedora, the regression tests fail due to the order of their execution. We haven't tried to figure out exactly why this happens, but on Redhat / Fedora, tests are executed out-of-order as follows:

/usr/local/pgsql/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --psqldir='/usr/local/pgsql/bin'    --inputdir=test --load-language=plpgsql --launcher=./test/launcher.sh  --dbname=contrib_regression 02-distribution_metadata 04-generate_ddl_commands 13-data_types 05-create_shards 11-citus_metadata_sync 03-extend_ddl_commands 10-utilities 09-queries 12-create_insert_proxy 07-repair_shards 01-connection 06-prune_shard_list 00-init 08-modifications
(using postmaster on Unix socket, default port)
============== dropping database "contrib_regression" ==============
NOTICE:  database "contrib_regression" does not exist, skipping
DROP DATABASE
============== creating database "contrib_regression" ==============
CREATE DATABASE
ALTER DATABASE
============== installing plpgsql                     ==============
CREATE LANGUAGE
============== running regression test queries        ==============
test 02-distribution_metadata ... FAILED
test 04-generate_ddl_commands ... FAILED
test 13-data_types            ... FAILED
test 05-create_shards         ... FAILED
test 11-citus_metadata_sync   ... FAILED
test 03-extend_ddl_commands   ... FAILED
test 10-utilities             ... FAILED
test 09-queries               ... FAILED
test 12-create_insert_proxy   ... FAILED
test 07-repair_shards         ... FAILED
test 01-connection            ... ok
test 06-prune_shard_list      ... FAILED
test 00-init                  ... ok
test 08-modifications         ... ok

========================
 11 of 14 tests failed. 
======================== 

In practice, we'd expect that tests are executed in the order, ie: 01, 02, ..., n. This change forces the tests being executed in the order on all operating systems.

Tested on Redhat 7.1 & Fedora 22.

onderkalaci commented 8 years ago

@jasonmp85 We've already discussed this, so you already have the context.

jasonmp85 commented 8 years ago

Yeah, I'd like to know how sort in Makefiles responds to e.g. other collations and whatnot, but given our numeric prefix I think that's probably an edge case. Appears to work on OS X, this branch is about Red Hat, and Travis runs on Ubuntu, so I think we're good to go (at any rate this is better than what we had before).