const { PrismaClient } = require('@prisma/client')
const assert = require('assert')

module.exports = async () => {
  const db = new PrismaClient({
    errorFormat: 'colorless',
  })

  await db.user.findMany()

  db.engine.child.kill()

  await new Promise((r) => setTimeout(r, 1000))

  const result = await db.user.findMany()
  assert(result.length > 0)

  db.disconnect()
}

if (require.main === module) {
  module.exports()
}

@@ -351,16 +351,385 @@
 h %3E 0)%0A%0A
+  for (let i = 0; i %3C 7; i++) %7B%0A    db.engine.child.kill()%0A    await new Promise((r) =%3E setTimeout(r, 200))%0A  %7D%0A  let err%0A  try %7B%0A    const result = await db.user.findMany()%0A  %7D catch (e) %7B%0A    err = e%0A  %7D%0A  assert(%0A    err.message.includes(%0A      'Please look into the logs or turn on the env var DEBUG=* to debug the constantly restarting query engine.',%0A    ),%0A  )%0A%0A
   db.dis

fix tests