This is an automated email from the ASF dual-hosted git repository.
nodece pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/casbin-node-extensions.git
The following commit(s) were added to refs/heads/main by this push:
new 6dd6bb5 fix: serialize basic-adapter jest suites - mysql/mysql2 race
on casbin_rule (#5)
6dd6bb5 is described below
commit 6dd6bb5b5a81fc08522fa830906c758524b8d96b
Author: Zixuan Liu <[email protected]>
AuthorDate: Tue Nov 3 09:46:06 2026 +0800
fix: serialize basic-adapter jest suites - mysql/mysql2 race on casbin_rule
(#5)
jest runs test files in parallel workers; mysql-adapter.test.ts and
mysql2-adapter.test.ts both CREATE TABLE casbin_rule in the same mysql
database, so the slower worker fails with ER_TABLE_EXISTS_ERROR. The race
was always present and surfaced under a loaded runner pool. --runInBand
serializes the five dialect suites inside the package (packages were
already serialized via --workspace-concurrency=1).
---
packages/adapters/basic-adapter/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/adapters/basic-adapter/package.json
b/packages/adapters/basic-adapter/package.json
index ef2867e..203dfe9 100644
--- a/packages/adapters/basic-adapter/package.json
+++ b/packages/adapters/basic-adapter/package.json
@@ -9,7 +9,7 @@
"lint": "eslint --ext .ts src/ test/",
"format": "npm run format:check -- --write",
"format:check": "prettier --check \"**/*.{md,json}\"
\"{src,test}/**/*.ts\"",
- "test": "jest --forceExit"
+ "test": "jest --forceExit --runInBand"
},
"dependencies": {
"knex": "^2.5.1"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]