fix(qc-test-runner): fix a bunch of iTX issues in the test runner
- Handle transaction manager errors in `worker-transaction.ts` and
return them as part of the response like QE does.
- Similarly, handle user facing errors in batch requests and return them
appropriately. Previously only errors in non-batch queries were
handled. Unfortunately we can't pull this logic to the very top to
ensure any and all user facing errors are caught because the expected
format of errors in response is different for different methods.
- Align the transaction defaults with Prisma Client and make them less
aggressive. This fixes some test flakiness that happens when running
the tests locally with `cargo test` without retries (those weren't
a problem on CI because the retries configured for `cargo nextest`
mitigated this problem).
- Fix running non-transactional batches from within an interactive
transaction. Previously they would be executed on the wrong
connection.
- Add an orderBy argument to the final select in
`new::interactive_tx::interactive_tx::batch_queries_success`. We don't
have compacting a batch implemented, and we run non-transactional
batches concurrently and not sequentially in `qc-test-runner`. Since
we don't guarantee any particular execution order for
non-transactional batches (and neither does the database guarantee
that the selection order would match the insertion order, it just
usually happens to work in practice), the result that the test was
failing with was equally correct.
Closes: https://linear.app/prisma-company/issue/ORM-893/fix-remaining-interactive-transaction-tests
Closes: https://linear.app/prisma-company/issue/ORM-961/transaction-failed-due-to-a-write-conflict-in-occ-update-many-test
Closes: https://github.com/prisma/prisma-engines/pull/5326