hotfix: run tests one at a time

SUMMARY
    The test suite messy and inefficient in every imaginable way. It
    creates a DB connection pool for every unit test and Postgres failed
    with the following error:

    code: "53300", message: "sorry, too many clients already

    This hotfix runs tests via scripts/tests.sh, which executes one test
    at a time.

    Ideally, the connection pool must be shared across the whole test
    suite but this requires a major refactor of the test suite and even
    the app code. A refactor towards this is in progress in the
    `db-abstract` branch, which I hope to complete within this week.

fixes #22
This commit is contained in:
realaravinth
2022-05-09 11:27:06 +05:30
parent 5160e210f3
commit a00823544e
2 changed files with 51 additions and 1 deletions

View File

@@ -75,7 +75,8 @@ run: frontend ## Run app in debug mode
cargo run
test: frontend-test frontend ## Run all available tests
cargo test --all-features --no-fail-fast
./scripts/tests.sh
# cargo test --all-features --no-fail-fast
xml-test-coverage: migrate ## Generate code coverage report in XML format
cargo tarpaulin -t 1200 --out Xml