chore(prisma): Improve prisma test execution time#7953
Conversation
Overall package sizeSelf size: 5.47 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7953 +/- ##
==========================================
- Coverage 74.12% 73.86% -0.27%
==========================================
Files 772 773 +1
Lines 35809 35955 +146
==========================================
+ Hits 26545 26558 +13
- Misses 9264 9397 +133 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 9a8ca3a | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
BenchmarksBenchmark execution time: 2026-04-08 18:47:46 Comparing candidate commit 9a8ca3a in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 225 metrics, 35 unstable metrics. |
What does this PR do?
This PR optimizes the prisma test suite execution time.
Firstly it changes execPrismaGenerate from running 3 times per (config, version) pair to once in each of the without configuration, with out tracer initialization and with custom service describe blocks.
Since all the blocks use the same schema and version, the generated output is identical.
Added missing $disconnect() in integration test server files. The driver adpater connection was staying open and preventing Node.js from exiting, causing assertMessageReceived to wait until it's 30s default timeout.
Motivation
Unit tests: 18s → 6–7s
v7 PostgreSQL adapter integration tests: 10.5s/test → 530ms/test
v7 MSSQL adapter integration tests: 30.7s/test → 710ms/test
Full suite: from 4m → 2m
Additional Notes