[PR #7560] [MERGED] test(organization): fix flaky tests #7399

Closed
opened 2026-03-13 13:34:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7560
Author: @himself65
Created: 1/22/2026
Status: Merged
Merged: 1/22/2026
Merged by: @himself65

Base: canaryHead: himself65/2026/01/22/falky-test


📝 Commits (1)

  • f142a23 test(organization): fix flaky tests

📊 Changes

1 file changed (+31 additions, -17 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/organization.test.ts (+31 -17)

📄 Description

Summary by cubic

Fix flaky organization tests by creating users and adding members in parallel. This removes race conditions and speeds up the test run.

  • Bug Fixes
    • Use Promise.all to create users and add members concurrently instead of sequentially.
    • In the member limit test, create both users in parallel before fetching sessions and adding roles.

Written for commit f142a23dd1. Summary will update on new commits.


🔄 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/7560 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/22/2026 **Status:** ✅ Merged **Merged:** 1/22/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2026/01/22/falky-test` --- ### 📝 Commits (1) - [`f142a23`](https://github.com/better-auth/better-auth/commit/f142a23dd158c1bf967fce18cb6fe0d3fc1c75a5) test(organization): fix flaky tests ### 📊 Changes **1 file changed** (+31 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+31 -17) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Fix flaky organization tests by creating users and adding members in parallel. This removes race conditions and speeds up the test run. - **Bug Fixes** - Use Promise.all to create users and add members concurrently instead of sequentially. - In the member limit test, create both users in parallel before fetching sessions and adding roles. <sup>Written for commit f142a23dd158c1bf967fce18cb6fe0d3fc1c75a5. Summary will update on new commits.</sup> <!-- 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-03-13 13:34:56 -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#7399