test(sql): cover both adapters in the synchronous-tls-rejection test#32415
Conversation
Extends the existing postgres-only test to mysql via test.each. The constructor throws synchronously and createPooledConnectionHandle defers onClose via process.nextTick (since #32145) so the pending query rejects cleanly; this locks that in for both adapters.
|
Updated 3:26 PM PT - Jun 16th, 2026
❌ @alii, your commit d852045 has 2 failures in
🧪 To try this PR locally: bunx bun-pr 32415That installs a local version of the PR into your bun-32415 --bun |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
👮 Files not reviewed due to content moderation or server errors (1)
WalkthroughThe TLS validation test in the "shared createInstance validation (no server)" suite is converted from a single-adapter case to a parameterized ChangesTLS Validation Test Parameterization
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@robobun can you stamp/approve this pr? |
There was a problem hiding this comment.
LGTM — test-only change parameterizing an existing assertion across both SQL adapters.
Extended reasoning...
Overview
This PR touches a single test file (test/js/sql/sql.test.ts), converting one existing test.concurrent case into a test.concurrent.each(["postgres", "mysql"]) so the synchronous tls must be a boolean or an object rejection is asserted for both adapters instead of just postgres. The test body is unchanged aside from spreading adapter over base (which already defaults to postgres) and an expanded comment referencing #32145.
Security risks
None. No production code is modified; the change only adds a second parameterized run of an existing negative-path test against a non-listening port (127.0.0.1:1), so no network or auth surface is involved.
Level of scrutiny
Low. This is a mechanical test extension following the exact test.concurrent.each pattern already used a few lines above in the same describe block (e.g. the null-byte credential test). The diff is small, self-contained, and the PR description confirms 2/2 pass locally.
Other factors
The bug-hunting system found no issues. There are no outstanding reviewer comments, and the only timeline entry is the robobun build link. The override of base.adapter via spread is correct (later key wins), so the mysql case actually exercises the mysql path.
|
@robobun please! it's really simple. I actually meant can you review it and then stamp... |
|
@robobun please can you review it 😢 you don't have to stamp for now, just a review |
|
lol |
Extends the existing postgres-only
rejects tls that is neither a boolean nor an objecttest (added in #32352) to mysql viatest.each.The native constructor throws synchronously on a non-boolean/non-object
tls, andcreatePooledConnectionHandledefersonCloseviaprocess.nextTick(since #32145) so the pending query rejects cleanly instead of hanging. This locks that in for both adapters.No code change; 2/2 pass on
bun bd test.