Commit Graph

9 Commits (leftjoin_push)

Author SHA1 Message Date
Jelte Fennema 7b60cdd13b
Convert columnar tap tests to pytest (#6720)
Having as little Perl as possible in our repo seems a worthy goal. Sadly
Postgres its Perl based TAP infrastructure was the only way in which we
could
run tests that were hard to do using only SQL commands. This change adds
infrastructure to run such "application style tests" using python and
converts all our existing Perl TAP tests to this new infrastructure.

Some of the helper functions that are added in this PR are currently
unused. Most of these will be used by the CDC PR that depends on this.
Some others are there because they were needed by the PgBouncer test
framework that this is based on, and the functions seemed useful enough
to citus testing to keep.

The main features of the test suite are:
1. Application style tests using a programming language that our
developers know how to write.
2. Caching of Citus clusters in-between tests using the ["fixture"
pattern][fixture] from `pytest` to achieve speedy tests. To make this
work in practice any changes made during a test are automatically
undone. Schemas, replication slots, subscriptions, publications are
dropped at the end of each test. And any changes made by `ALTER SYSTEM`
or manually editing of `pg_hba.conf` are undone too.
3. Automatic parallel execution of tests using the `-n auto` flag that's
added by `pytest-xdist`. This improved the speed of tests greatly with
the similar test framework I created for PgBouncer. Right now it doesn't
help much yet though, since this PR only adds two tests (one of which
takes ~10 times longer than the other).

Possible future improvements are:
1. Clean up even more things at the end of each test (e.g. users that
were created). These are fairly easy to add, but I have not done so yet
since they were not needed yet for this PR or the CDC PR. So I would not
be able to test the cleanup easily.
2. Support for query block detection similar to what we can now do using
isolation tests.

[fixture]: https://docs.pytest.org/en/6.2.x/fixture.html
2023-03-31 12:25:19 +02:00
Hanefi Onaldi a58523f1d8
Remove all references to .source files 2022-08-09 14:15:52 +03:00
Jelte Fennema d0ba122061
Editorconfig: configure 4 spaces for python files (#4953) 2021-05-05 10:32:47 +00:00
Jelte Fennema 6340fc1171
Fix editorconfig syntax (#3272)
The comma needs to be contained in curly braces otherwise it does not work
2019-12-06 17:05:04 +01:00
Philip Dubé c563e0825c Strip trailing whitespace and add final newline (#3186)
This brings files in line with our editorconfig file
2019-11-21 14:25:37 +01:00
Jelte Fennema f0f702c604
Add sane editorconfig settings (#3051)
- UNIX line endings
- utf8
- newline at end of file
- trim trailing whitespace
2019-10-08 15:07:01 +02:00
Jelte Fennema 7172c7f727
Add editorconfig settings for yaml files (#3027) 2019-09-24 16:09:20 +02:00
Jelte Fennema ea2e010d42 Better editorconfig 2019-09-12 16:40:25 +02:00
Jason Petersen 1fa2a25695 Set tab size for GitHub display
Hooray!
2017-03-22 13:03:39 -06:00