IntersectMBO / IntersectMBO/cardano-db-sync

Improving Test Execution Time

Open
#2,121 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
318
Forks
168
PR merge metrics
No merged PRs in 30d

Description

Running the full suite of tests currently takes ~15 minutes, the majority of which is running the database integration tests. For this reason, we need to be judicious in choosing what to test. Speeding this up would allow us to include more variations of tests, such as on-disk and in-memory backends, or different insert options (full, UTxO, governance, etc).

The most effective things that would reduce execution time are:

* **Run tests concurrently:** Currently, tests are run sequentially, because they share a single PostgreSQL database. However, by creating multiple copites of the database schema, we could run multiple tests at the same time.

* **Tune assertion backoff delays:** The assertion backoff delays have a maximum wait of ~50 seconds, and a maximum interval time of 2.5 seconds. This could be tuned to reduce idle time. We could also have non-waiting variants of all the query assertions.

Furthermore, the fingerprinting mechanism is used to speed up tests, but provides only a minimal boost. I would therefore propose removing this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.