mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
test: run integration tests on random ports and speed up slow tests (#39842)
Integration test processes now get their own work directory, config file and random ports, so several runs can execute in parallel on one machine. The slowest tests also lose fixed sleeps and needlessly expensive setup, with their assertions kept. - Batch PostgreSQL sequence resets, the main per-test fixture cost there - Cheap hashing params in hash and OAuth2 fixture tests, full-cost vectors stay - Single fetch for negative Actions runner assertions instead of 1s polls - Queue flushes and backdated timestamps instead of sleeps - In-memory SQLite test journal, tmpfs for PostgreSQL in CI - E2E instance writes SSH keys into its work directory instead of `~/.ssh/authorized_keys`
This commit is contained in:
1 parent
d0c35bcd58
commit
1031e34987
42 files changed
+219
-179
No files matched your search
@@ -48,6 +48,10 @@ Run a single integration test with the `#` selector:
|
||||
make test-integration#TestName
|
||||
```
|
||||
|
||||
Each run gets its own work directory under `tests/integration/` and random ports, so SQLite runs
|
||||
can execute in parallel. Runs against other databases still share the database and object storage.
|
||||
The work directory is removed after a passing run and kept after a failure.
|
||||
|
||||
If you hit errors such as a mismatched database version or SSH push failures, try a
|
||||
clean rebuild first:
|
||||
|
||||
|
||||
Reference in new issue
Block a user