Skip to content

Commit

Permalink
fix: kill all backends to the test database
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Aug 14, 2020
1 parent 651962d commit 46f7378
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/slonik/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ beforeEach(async () => {
SELECT pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE
state = 'active' AND
pid != pg_backend_pid()
pid != pg_backend_pid() AND
datname = 'slonik_test'
`);
await connection.query(sql`DROP DATABASE IF EXISTS slonik_test`);
await connection.query(sql`CREATE DATABASE slonik_test`);
Expand Down

0 comments on commit 46f7378

Please sign in to comment.