Repository navigation
meta(mssql): ensure sequential run to fix flaky test - #18037
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a concurrency issue in MSSQL tests by ensuring sequential execution of login operations instead of parallel execution via Promise.all(). The change addresses potential race conditions or database state issues that can occur when multiple login logs are created simultaneously in MSSQL.
Key Changes
- Changed parallel login creation (
Promise.all()) to sequentialawaitcalls in MSSQL regression tests - Removed CHANGELOG.md files (likely generated files that should not be version controlled)
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/test/integration/dialects/mssql/regressions.test.js | Changed from parallel to sequential execution of createLoginLog() calls to fix MSSQL-specific race conditions |
| CHANGELOG.md | Removed generated changelog file |
| packages/core/CHANGELOG.md | Removed generated changelog file |
| packages/utils/CHANGELOG.md | Removed generated changelog file |
| packages/validator-js/CHANGELOG.md | Removed generated changelog file |
WalkthroughMultiple CHANGELOG.md files across the monorepo root and package directories had their entire content removed. Additionally, a test file was modified to convert parallel LoginLog creation using Promise.all into sequential execution via individual await statements. Changes
Sequence DiagramsequenceDiagram
participant Test
participant DB as Database
rect rgb(255, 230, 200)
Note over Test,DB: Before (Parallel)
Test->>DB: Promise.all([create LoginLog 1, 2, 3, 4])
par
DB-->>Test: LoginLog 1 created
DB-->>Test: LoginLog 2 created
DB-->>Test: LoginLog 3 created
DB-->>Test: LoginLog 4 created
and
Note over DB: Parallel execution
end
end
rect rgb(230, 245, 255)
Note over Test,DB: After (Sequential)
Test->>DB: await create LoginLog 1
DB-->>Test: LoginLog 1 created
Test->>DB: await create LoginLog 2
DB-->>Test: LoginLog 2 created
Test->>DB: await create LoginLog 3
DB-->>Test: LoginLog 3 created
Test->>DB: await create LoginLog 4
DB-->>Test: LoginLog 4 created
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Just to check; this is the same fix as #17986 right? I'm happy to close that one in favor of this so I can approve and merge it |
oh wow. didnt see that one but yeah. doesnt matter either way. cheers for merge. |
* main: (55 commits) v7.0.0-alpha.47 fix(core): correct subquery join resolution & use alias minification for join references (sequelize#18012) meta(mssql): ensure sequential run to fix flaky test (sequelize#18037) meta: update dependency eslint-plugin-jsdoc to v61.1.5 meta: update dependency eslint-plugin-jsdoc to v61 (sequelize#18025) meta: update amannn/action-semantic-pull-request action to v6 (sequelize#18022) meta: update actions/stale action to v10 (sequelize#18021) meta: update actions/setup-node action to v6 (sequelize#18020) meta: update actions/github-script action to v8 (sequelize#18019) meta: update actions/checkout action to v5 (sequelize#18018) meta: update yarn to v4.10.3 meta: update dependency nx to v21.6.5 (sequelize#18016) meta: update dependency node-gyp to v11.5.0 meta: update dependency @oclif/core to ^4.5.6 meta: update dependency esbuild to v0.25.11 meta: update dependency zod to ^4.1.12 meta: update dependency @inquirer/select to ^4.4.0 meta: update dependency @inquirer/checkbox to ^4.3.0 meta: update dependency @inquirer/input to ^4.2.5 meta: update dependency @inquirer/confirm to ^5.1.19 ...
Pull Request Checklist
Description of Changes
Switch from promise all to a series of await calls to ensure order insertion.
fixes: #18036
List of Breaking Changes
None
Summary by CodeRabbit
Chores
Tests