- Start tests
pnpm run test
- Make some changes in tests, see tests reload
- Make some more changes in tests, see tests reload (The tests also do not finish immediately)
- Try to stop tests with Ctrl+c, it does not work
- (kill process with kill -9 pid)
-
Start database:
pnpm run startdb
-
Start server:
pnpm run dev
-
Hit
GET /rollback/native
several times and look at the server logs -
We can test now how
effection
handles a shutdown of the server with the following steps:GET /rollback
- stop server in less than 5 seconds
- look at server response and fastify log
This operation will take much longer if we hit a route with a
database query (like GET /benchmark/no/db
) before.
- Start database:
pnpm run startdb
- Start server:
pnpm run bench:server
- Run benchmark:
pnpm run bench:start