Navigation Menu

Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed May 29, 2020
1 parent 7bb54bd commit 6e99505
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/packages/client/src/__tests__/runtime-tests/restart/index.js
Expand Up @@ -15,6 +15,22 @@ module.exports = async () => {
const result = await db.user.findMany()
assert(result.length > 0)

for (let i = 0; i < 7; i++) {
db.engine.child.kill()
await new Promise((r) => setTimeout(r, 200))
}
let err
try {
const result = await db.user.findMany()
} catch (e) {
err = e
}
assert(
err.message.includes(
'Please look into the logs or turn on the env var DEBUG=* to debug the constantly restarting query engine.',
),
)

db.disconnect()
}

Expand Down

0 comments on commit 6e99505

Please sign in to comment.