Skip to content

Commit

Permalink
Merge pull request #1152 from UniversityOfHelsinkiCS/trunk
Browse files Browse the repository at this point in the history
Fixed jest warning about open handles
  • Loading branch information
esakemp authored Jul 23, 2019
2 parents b6b3ef1 + 978d0e5 commit b769b89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/backend/oodikone2-backend/test/jest/globals.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { sequelize } = require('../../src/models/index')
const { sequelizeKone } = require('../../src/models/models_kone')
const { redisClient } = require('../../src/services/redis')
const { forceSyncDatabase } = require('../../src/database/connection')
const { seedAllMigrations } = require('../../src/database/seed_migrations')
Expand All @@ -10,5 +11,7 @@ beforeAll(async () => {

afterAll(async () => {
await sequelize.close()
await redisClient.quitAsync()
await sequelizeKone.close()
// https://stackoverflow.com/a/54560610
await new Promise(res => redisClient.quit(() => setImmediate(res)))
})

0 comments on commit b769b89

Please sign in to comment.