[PR #4601] [CLOSED] Close in-memory better-sqlite3 database in cleanup (merges into #4600) #13722

Closed
opened 2026-04-13 09:06:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4601
Author: @cubic-dev-ai[bot]
Created: 9/12/2025
Status: Closed

Base: fix/org-hooksHead: cubic-fix-packages-better-auth-src-test-utils-test-instance-ts-L86-1757642034


📝 Commits (1)

  • 8de7833 Close in-memory better-sqlite3 database in cleanup (merges into #4600)

📊 Changes

1 file changed (+8 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/test-utils/test-instance.ts (+8 -1)

📄 Description

🤖 PR by cubic

This PR addresses the comment in #4600 – fix(organization): member and team hooks should apply on create organization

File: packages/better-auth/src/test-utils/test-instance.ts
Line: 86
Comment:

Creating an in-memory better-sqlite3 database without closing it in cleanup can leak native resources; add a sqlite cleanup branch that calls close() on the Database instance.

This fix was automatically generated. Please review the changes carefully before merging.


Summary by cubic

Close the in-memory better-sqlite3 database during test cleanup to prevent native resource leaks when running tests with "sqlite". Adds a sqliteDb reference and calls close() in the cleanup branch.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4601 **Author:** [@cubic-dev-ai[bot]](https://github.com/apps/cubic-dev-ai) **Created:** 9/12/2025 **Status:** ❌ Closed **Base:** `fix/org-hooks` ← **Head:** `cubic-fix-packages-better-auth-src-test-utils-test-instance-ts-L86-1757642034` --- ### 📝 Commits (1) - [`8de7833`](https://github.com/better-auth/better-auth/commit/8de7833badda16ef6f6adcb176dab511eed5bfb4) Close in-memory better-sqlite3 database in cleanup (merges into #4600) ### 📊 Changes **1 file changed** (+8 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/test-utils/test-instance.ts` (+8 -1) </details> ### 📄 Description 🤖 PR by [cubic](https://cubic.dev) This PR addresses the comment in [#4600 – fix(organization): member and team hooks should apply on create organization](https://github.com/better-auth/better-auth/pull/4600) **File:** `packages/better-auth/src/test-utils/test-instance.ts` **Line:** 86 **Comment:** > Creating an in-memory better-sqlite3 database without closing it in cleanup can leak native resources; add a sqlite cleanup branch that calls close() on the Database instance. *This fix was automatically generated. Please review the changes carefully before merging.* <!-- Metadata --> <!-- owner: better-auth --> <!-- repo: better-auth --> <!-- pull_number: 4600 --> <!-- End of metadata --> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Close the in-memory better-sqlite3 database during test cleanup to prevent native resource leaks when running tests with "sqlite". Adds a sqliteDb reference and calls close() in the cleanup branch. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 09:06:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#13722