Progress: resolved 1648, reused 0, downloaded 1626, added 1646
+ ls -alh bin/
total 732M
drwxr-xr-x. 2 root root 4.0K May 17 09:49 .
drwxr-xr-x. 49 root root 4.0K May 17 09:50 ..
-rwxr-xr-x. 1 root root 106M May 17 09:47 pd-server
-rwxr-xr-x. 1 root root 208M May 17 09:47 tidb-server
-rwxr-xr-x. 1 root root 419M May 17 09:47 tikv-server
+ ./bin/pd-server -V
Release Version: v8.2.0-alpha-36-g36a1fa231
Edition: Community
Git Commit Hash: 36a1fa2314f1efee7d568842b984a5eada496ed0
Git Branch: master
UTC Build Time: 2024-05-17 08:34:20
+ ./bin/tikv-server -V
TiKV
Release Version: 8.2.0-alpha
Edition: Community
Git Commit Hash: a1a8672e93c4da9c2dc5704151314d92e1bc4c04
Git Commit Branch: master
UTC Build Time: 2024-05-17 07:51:19
Rust Version: rustc 1.77.0-nightly (89e2160c4 2023-12-27)
Enable Features: memory-engine pprof-fp jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine trace-async-tasks openssl-vendored
Profile: dist_release
+ ./bin/tidb-server -V
Release Version: v8.2.0-alpha-187-g68db9c06fd
Edition: Community
Git Commit Hash: 68db9c06fd3314dc647ccbab32596a6f3c70245a
Git Branch: HEAD
UTC Build Time: 2024-05-17 09:43:47
GoVersion: go1.21.0
Race Enabled: false
Check Table Before Drop: false
Store: unistore
[Pipeline] sh
wait pd ready...
Progress: resolved 1648, reused 0, downloaded 1627, added 1647
Progress: resolved 1648, reused 0, downloaded 1628, added 1647
Progress: resolved 1648, reused 0, downloaded 1628, added 1648, done
typeorm-0.3.17 start
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/go
.../node_modules/@prisma/engines postinstall$ node scripts/postinstall.js
.../core-js@3.26.0/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../node_modules/spawn-sync postinstall$ node postinstall
.../sqlite3@5.1.2/node_modules/sqlite3 install$ node-pre-gyp install --fallback-to-build
.../.pnpm/yarn@1.22.19/node_modules/yarn preinstall$ :; (node ./preinstall.js > /dev/null 2>&1 || true)
.../core-js@3.26.0/node_modules/core-js postinstall: Done
.../node_modules/spawn-sync postinstall: Done
.../.pnpm/yarn@1.22.19/node_modules/yarn preinstall: Done
.../sqlite3@5.1.2/node_modules/sqlite3 install: node-pre-gyp info it worked if it ends with ok
.../sqlite3@5.1.2/node_modules/sqlite3 install: node-pre-gyp info using node-pre-gyp@1.0.10
.../sqlite3@5.1.2/node_modules/sqlite3 install: node-pre-gyp info using node@18.13.0 | linux | x64
.../sqlite3@5.1.2/node_modules/sqlite3 install: node-pre-gyp info check checked for "/home/jenkins/agent/workspace/pingcap/tidb/merged_integration_nodejs_test/tidb-test/prisma_test/prisma-4.16.x/node_modules/.pnpm/sqlite3@5.1.2/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-x64/node_sqlite3.node" (not found)
.../sqlite3@5.1.2/node_modules/sqlite3 install: node-pre-gyp http GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.2/napi-v6-linux-glibc-x64.tar.gz
.../node_modules/@prisma/engines postinstall: Done
.../sqlite3@5.1.2/node_modules/sqlite3 install: node-pre-gyp info install unpacking napi-v6-linux-glibc-x64/node_sqlite3.node
.../sqlite3@5.1.2/node_modules/sqlite3 install: node-pre-gyp info extracted file count: 1
.../sqlite3@5.1.2/node_modules/sqlite3 install: node-pre-gyp info ok
.../sqlite3@5.1.2/node_modules/sqlite3 install: [sqlite3] Success: "/home/jenkins/agent/workspace/pingcap/tidb/merged_integration_nodejs_test/tidb-test/prisma_test/prisma-4.16.x/node_modules/.pnpm/sqlite3@5.1.2/node_modules/sqlite3/lib/binding/napi-v6-linux-glibc-x64/node_sqlite3.node" is installed via remote
.../sqlite3@5.1.2/node_modules/sqlite3 install: Done
.../node_modules/@swc/core postinstall$ node postinstall.js
.../node_modules/@swc/core postinstall$ node postinstall.js
.../esbuild@0.15.13/node_modules/esbuild postinstall$ node install.js
.../esbuild@0.18.2/node_modules/esbuild postinstall$ node install.js
.../prisma@5.4.2/node_modules/prisma preinstall$ node scripts/preinstall-entry.js
.../node_modules/@swc/core postinstall: Done
.../node_modules/@swc/core postinstall: Done
.../esbuild@0.15.13/node_modules/esbuild postinstall: Done
.../esbuild@0.18.2/node_modules/esbuild postinstall: Done
.../prisma@5.4.2/node_modules/prisma preinstall: Done
.../node_modules/yo postinstall$ yodoctor
.../node_modules/yo postinstall: Yeoman Doctor
.../node_modules/yo postinstall: Running sanity checks on your system
.../node_modules/yo postinstall: ✔ No .bowerrc file in home directory
.../node_modules/yo postinstall: ✔ Global configuration file is valid
.../node_modules/yo postinstall: ✔ NODE_PATH matches the npm root
.../node_modules/yo postinstall: ✔ No .yo-rc.json file in home directory
.../node_modules/yo postinstall: ✔ Node.js version
.../node_modules/yo postinstall: ✔ npm version
.../node_modules/yo postinstall: ✖ yo version
.../node_modules/yo postinstall: Your yo version is outdated.
.../node_modules/yo postinstall: Upgrade to the latest version by running:
.../node_modules/yo postinstall: npm install -g yo@latest
.../node_modules/yo postinstall: Found potential issues on your machine :(
.../node_modules/yo postinstall: Done
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
devDependencies:
+ @microsoft/api-extractor 7.35.3
+ @sindresorhus/slugify 1.1.2
+ @slack/webhook 6.1.0
+ @types/benchmark 2.1.2
+ @types/fs-extra 9.0.13
+ @types/graphviz 0.0.35
+ @types/node 18.16.16
+ @types/node-fetch 2.6.4
+ @types/redis 2.8.32
+ @types/resolve 1.20.2
+ @typescript-eslint/eslint-plugin 5.59.11
+ @typescript-eslint/parser 5.59.11
+ arg 5.0.2
+ batching-toposort 1.2.0
+ buffer 6.0.3
+ chokidar 3.5.3
+ esbuild 0.15.13
+ esbuild-register 3.3.3
+ eslint 8.43.0
+ eslint-config-prettier 8.8.0
+ eslint-plugin-eslint-comments 3.2.0
+ eslint-plugin-import 2.27.5
+ eslint-plugin-jest 27.2.1
+ eslint-plugin-prettier 4.2.1
+ eslint-plugin-simple-import-sort 10.0.0
+ eventemitter3 5.0.1
+ execa 5.1.1
+ fs-extra 11.1.1
+ globby 11.1.0
+ graphviz-mit 0.0.9
+ husky 8.0.3
+ is-ci 3.0.1
+ jest-junit 16.0.0
+ kleur 4.1.5
+ lint-staged 13.2.2
+ node-fetch 2.6.11
+ p-map 4.0.0
+ p-reduce 2.1.0
+ p-retry 4.6.2
+ path-browserify 1.0.1
+ prettier 2.8.8
+ redis 3.1.2
+ redis-lock 0.1.4
+ regenerator-runtime 0.13.11
+ resolve 1.22.2
+ safe-buffer 5.2.1
+ semver 7.5.1
+ spdx-exceptions 2.3.0
+ spdx-license-ids 3.0.13
+ staged-git-files 1.3.0
+ ts-node 10.9.1
+ ts-toolbelt 9.6.0
+ tty-browserify 0.0.1
+ typescript 4.9.5
+ util 0.12.5
+ zx 7.2.2
. preinstall$ node ./scripts/only-allow-pnpm.js pnpm
. preinstall: Done
. prepare$ is-ci || husky install
. prepare: Done
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecatedpackages/engines postinstall$ node scripts/postinstall.js
wait tikv ready...
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm WARN deprecated npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
packages/engines postinstall: Done
packages/client postinstall$ node scripts/postinstall.js
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
packages/client postinstall: prisma:warn We could not find your Prisma schema at `prisma/schema.prisma`.
packages/client postinstall: If you have a Prisma schema file in a custom path, you will need to run
packages/client postinstall: `prisma generate --schema=./path/to/your/schema.prisma` to generate Prisma Client.
packages/client postinstall: If you do not have a Prisma schema file yet, you can ignore this message.
packages/client postinstall: Done
packages/cli preinstall$ node scripts/preinstall-entry.js
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecatedpackages/cli preinstall: Done
Done in 43.6s
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
> dev-env@ build /home/jenkins/agent/workspace/pingcap/tidb/merged_integration_nodejs_test/tidb-test/prisma_test/prisma-4.16.x
> ts-node scripts/setup.ts --build
./. git config --global user.email "prismabots@gmail.com"
./. git config --global user.name "prisma-bot"
Building packages
./. pnpm -r build
Scope: 13 of 14 workspace projects
packages/debug build$ node -r esbuild-register helpers/build.ts
sequelize orm v6 test start
/go
tikv: 127.0.0.1:2379
installing packages ...
packages/debug build: Done
packages/generator-helper build$ node -r esbuild-register helpers/build.ts
packages/get-platform build$ node -r esbuild-register helpers/build.ts
packages/generator-helper build: Done
packages/get-platform build: Done
packages/fetch-engine build$ node -r esbuild-register helpers/build.ts
packages/fetch-engine build: Done
packages/engines build$ node -r esbuild-register helpers/build.ts
packages/engines build: Analysis will use the bundled TypeScript version 5.0.4
packages/engines build: Writing package typings: /home/jenkins/agent/workspace/pingcap/tidb/merged_integration_nodejs_test/tidb-test/prisma_test/prisma-4.16.x/packages/engines/dist/index.d.ts
packages/engines build: Done
packages/internals build$ node -r esbuild-register helpers/build.ts
added 1144 packages, and audited 1145 packages in 32s
111 packages are looking for funding
run `npm fund` for details
26 vulnerabilities (1 low, 9 moderate, 15 high, 1 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
> typeorm@0.3.17 test
> rimraf ./build && tsc && mocha --file ./build/compiled/test/utils/test-setup.js --bail --recursive --timeout 90000 ./build/compiled/test
packages/internals build: Done
packages/instrumentation build$ node -r esbuild-register helpers/build.ts
packages/migrate build$ node -r esbuild-register helpers/build.ts
packages/instrumentation build: Done
packages/migrate build: Done
packages/client build$ node -r esbuild-register helpers/build.ts
packages/integration-tests build$ node -r esbuild-register helpers/build.ts
packages/integration-tests build: Done
packages/client build: Analysis will use the bundled TypeScript version 5.0.4
packages/client build: Writing package typings: /home/jenkins/agent/workspace/pingcap/tidb/merged_integration_nodejs_test/tidb-test/prisma_test/prisma-4.16.x/packages/client/runtime/index.d.ts
packages/client build: Analysis will use the bundled TypeScript version 5.0.4
packages/client build: Writing package typings: /home/jenkins/agent/workspace/pingcap/tidb/merged_integration_nodejs_test/tidb-test/prisma_test/prisma-4.16.x/packages/client/runtime/index-browser.d.ts
packages/client build: Done
packages/cli build$ node -r esbuild-register helpers/build.ts
packages/react-prisma build$ node -r esbuild-register helpers/build.ts
packages/cli build: Done
packages/react-prisma build: Done
> @prisma/integration-tests@0.0.0 test:tidb /home/jenkins/agent/workspace/pingcap/tidb/merged_integration_nodejs_test/tidb-test/prisma_test/prisma-4.16.x/packages/integration-tests
> jest integration.tidb --maxWorkers=1 --silent
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'eslint-plugin-jsdoc@37.9.7',
npm WARN EBADENGINE required: { node: '^12 || ^14 || ^16 || ^17' },
npm WARN EBADENGINE current: { node: 'v18.13.0', npm: '9.2.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@es-joy/jsdoccomment@0.20.1',
npm WARN EBADENGINE required: { node: '^12 || ^14 || ^16 || ^17' },
npm WARN EBADENGINE current: { node: 'v18.13.0', npm: '9.2.0' }
npm WARN EBADENGINE }
npm WARN deprecated abab@1.0.4: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated vm2@3.9.19: The library contains critical security issues and should not be used for production! The maintenance of the project has been discontinued. Consider migrating your code to isolated-vm.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated adal-node@0.1.28: This package is no longer supported. Please migrate to @azure/msal-node.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
benchmark > bulk-save > case1
✔ testing bulk save of 10.000 objects
benchmark > bulk-save > case2
✔ testing bulk save of 10000 objects
benchmark > bulk-save > case-querybuilder
✔ testing bulk save of 10000 objects
benchmark > bulk-sql-build
✔ testing bulk create of 10.000 sql with joins (1029ms)
benchmark > QueryBuilder > wide join
✔ testing query builder with join to 10 relations with 10 columns each
column kinds > create date column
✔ create date column should automatically be set by a database
✔ create date column can also be manually set by user
✔ create date column should not be updated automatically on every change (1023ms)
✔ create date column should set a custom date when specified
column kinds > geometry column
✔ geometry column with SRID defined should be saved without error for valid WKT input
✔ geometry column with SRID defined should be updated without error for valid WKT input
✔ geometry column with no SRID should be saved without error for valid WKT input
✔ geometry column with no SRID should be updated without error for valid WKT input
column kinds > update date column
✔ update date column should automatically be set by a database
✔ update column should not update if no changes were detected
✔ update date column can also be manually set by user
✔ update date column should be updated automatically on every change (2161ms)
npm WARN deprecated string-similarity@4.0.4: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated better-eval@1.3.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
✔ update date column should set a custom date when specified
column kinds > version column
✔ version column should automatically be set by a database (91ms)
✔ version column should not update version if no changes were detected
✔ version column can also be manually set by user
✔ version column should be updated automatically on every change (1051ms)
✔ version column should set a custom value when specified
xfail
it
✔ chai
✔ standard mocha
✔ async chai
base entity
✔ test if DataSource calls `useDataSource` of the provided entities
✔ test if DataSource calls `useDataSource` of the provided entities in the entities directory
custom cache provider
npm WARN deprecated loupe@2.3.6: Please upgrade to 2.3.7 which fixes GHSA-4q6p-r6v2-jvc5
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
✔ should be used instead of built-ins
npm WARN deprecated sinon@12.0.1: 16.1.1
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated @sinonjs/fake-timers@10.2.0: Use version 10.1.0. Version 10.2.0 has potential breaking issues
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
✔ should cache results properly (1039ms)
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
✔ should cache results with pagination enabled properly (1040ms)
> sequelize@0.0.0-development prepare
> npm run build && husky install
> sequelize@0.0.0-development build
> node ./build.js
Compiling sequelize...
PASS src/__tests__/integration/tidb/introspection.test.ts (15.382 s)
.git can't be found (see https://git.io/Jc3F9)
npm ERR! code 1
npm ERR! path /home/jenkins/agent/workspace/pingcap/tidb/merged_integration_nodejs_test/tidb-test/sequelize_test/sequelize_v6_test
npm ERR! command failed
npm ERR! command sh -c npm run build && husky install
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-05-17T09_50_23_773Z-debug-0.log
✔ should cache results with custom id and duration supplied (2043ms)
✔ should cache results with pagination enabled properly and custom id and loaded relations
tidb-server(PID: 308) started
loading test data to db ...
✔ should cache results with custom id and duration supplied (1035ms)
cascades > should insert by cascades from both sides (#57)
✔ should insert by cascades from owner side
columns > comments
✔ should persist comments of different types to the database
columns > embedded columns
✔ should insert / update / remove entity with embedded correctly
✔ should properly generate column names
columns > getters and setters
✔ should not update columns marked with readonly property
columns > no-selection functionality
> sequelize@0.0.0-development build
> node ./build.js
Compiling sequelize...
✔ should not select columns marked with select: false option
✔ should not select columns with QueryBuilder marked with select: false option
✔ should select columns with select: false even columns were implicitly selected
columns > readonly functionality
✔ should not update columns marked with readonly property
columns > update and insert control
✔ should respect column update and insert properties
columns > value-transformer functionality
✔ should marshal data using the provided value-transformer
✔ should apply three transformers in the right order
✔ should apply all the transformers
✔ should apply no transformer
PASS src/__tests__/integration/tidb/runtime.test.ts (13.971 s)
Test Suites: 2 passed, 2 total
Tests: 130 passed, 130 total
Snapshots: 130 passed, 130 total
Time: 29.802 s
prisma-4.16.x end
[Pipeline] }
Cache not saved (ws/jenkins-pingcap-tidb-merged_integration_nodejs_test-1171/tidb-test already exists)
[Pipeline] // cache
[Pipeline] }
✔ should marshal data using a complex value-transformer
commands - migration create
- should write regular empty migration file when no option is passed
- should write Javascript empty migration file when option is passed
- should use custom timestamp when option is passed
commands - migration generate
- writes regular migration file when no option is passed
- writes Javascript printed file when option is passed
- writes migration file with custom timestamp when option is passed
Connection
before connection is established
✔ connection.isConnected should be false
- entity manager and reactive entity manager should not be accessible
✔ should not be able to close
✔ should not be able to sync a schema
- should not be able to use repositories
✔ should be able to connect
establishing connection
- should throw DriverOptionNotSetError when extra.socketPath and host is missing
after connection is established successfully
[Pipeline] // dir
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
> sequelize@0.0.0-development teaser
> node test/teaser.js
###########################
# Running tests for mysql #
###########################
[Pipeline] // container
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
> sequelize@0.0.0-development test-integration
> yarn mocha --timeout 60000 --exit "test/integration/**/*.test.[tj]s"
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
yarn run v1.22.19
$ mocha -r ./test/registerEsbuild --timeout 60000 --exit 'test/integration/**/*.test.[tj]s'
[MYSQL] Alias
✓ should uppercase the first letter in alias getter, but not in eager loading (171ms)
✔ connection.isConnected should be true
✓ shouldnt touch the passed alias (115ms)
✓ should allow me to pass my own plural and singular forms to hasMany (70ms)
✓ should allow me to define plural and singular forms on the model (65ms)
[MYSQL] BelongsToMany
getAssociations
- supports transactions
✓ gets all associated objects with all fields
✓ gets all associated objects when no options are passed
✓ only get objects that fulfill the options
✓ supports a where not in
✔ entity manager and reactive entity manager should be accessible
✓ supports a where not in on the primary key
✓ only gets objects that fulfill options with a formatted value
✓ get associated objects with an eager load
✓ get associated objects with an eager load with conditions but not required (46ms)
✔ should not be able to connect again
✓ should support schemas (320ms)
✓ supports custom primary keys and foreign keys (279ms)
✓ supports primary key attributes with different field and attribute names (251ms)
✔ should be able to close a connection
working with repositories after connection is established successfully
✔ should be able to get simple entity repository
✔ should be able to get tree entity repository
generate a schema when connection.synchronize is called
✔ database should be empty after schema is synced with dropDatabase flag (134ms)
log a schema when connection.logSyncSchema is called
✔ should return sql log properly
after connection is closed successfully
✔ should not be able to close already closed connection
✔ connection.isConnected should be false
skip schema generation when synchronize option is set to false
✔ database should be empty after schema sync
different names of the same content of the schema
✔ should not interfere with each other
can change postgres default schema name
✔ schema name can be set
ConnectionManager
create
✔ should create a mysql connection when mysql driver is specified
get
✔ should give connection with a requested name
✔ should throw an error if connection with the given name was not found
create connection options
✔ should not drop the database if dropSchema was not specified (96ms)
✓ supports non primary key attributes for joins (sourceKey only) (3274ms)
✔ should drop the database if dropSchema was set to true (mysql) (303ms)
ConnectionOptionsReader
✔ properly loads config with entities specified
✔ properly loads sqlite in-memory/path config
✔ properly loads config with specified file path
✔ properly loads asynchronous config with specified file path
✔ properly loads config with specified file path from esm in js
✔ properly loads config from .env file
✔ properly loads config from ormconfig.env file
✔ properly loads config ormconfig.env when given multiple choices
cube-postgres
✔ should create correct schema with Postgres' cube type
✔ should persist cube correctly
✔ should update cube correctly
✔ should re-save cube correctly
✔ should persist cube of arity 0 correctly
✔ should be able to order cube by euclidean distance
✔ should persist cube array correctly
custom repository
✔ withRepository must work properly in transactions
database schema > column collation > cockroach
✔ should correctly create column with collation option
database schema > column collation > mssql
✔ should correctly create column with collation option
database schema > column collation > mysql
- should correctly create column with collation option
database schema > column collation > postgres
✔ should correctly create column with collation option
database schema > column collation > sqlite
- should correctly create column with collation option
database schema > column length > mssql
✔ all types should create with correct size
✔ all types should update their size
✔ all relevant types should update their size to max
database schema > column length > mysql
✔ all types should be created with correct length
✔ all types should update their length (302ms)
database schema > column length > postgres
✔ all types should create with correct size
✔ all types should update their size
database schema > column length > sap
✔ all types should create with correct size
✔ all types should update their size
database schema > column length > sqlite
✔ all types should create with correct size
✔ all types should update their size
database schema > column types > cockroachdb
✔ all types should work correctly - persist and hydrate
✔ all types should work correctly - persist and hydrate when options are specified on columns
✔ all types should work correctly - persist and hydrate when types are not specified on columns
database schema > column types > cockroachdb-enum
✔ should create table with ENUM column and save data to it
✔ should create ENUM column and revert creation
✔ should drop ENUM column and revert drop
✔ should create table with ENUM column and revert creation
✔ should drop table with ENUM column and revert drop
✔ should change non-enum column in to ENUM and revert change
✔ should change ENUM column in to non-enum and revert change
✔ should change ENUM array column in to non-array and revert change
✔ should change ENUM value and revert change
✔ should change `enumName` and revert change
✔ should not create new type if same `enumName` is used more than once
✔ should change both ENUM value and ENUM name and revert change
✔ should rename ENUM when column renamed and revert rename
✔ should rename ENUM when table renamed and revert rename
database schema > column types > mssql
✔ all types should work correctly - persist and hydrate
✔ all types should work correctly - persist and hydrate when options are specified on columns
✔ all types should work correctly - persist and hydrate when types are not specified on columns
database schema > column types > mysql
✔ all types should work correctly - persist and hydrate
✔ all types should work correctly - persist and hydrate when options are specified on columns
✔ all types should work correctly - persist and hydrate when types are not specified on columns
database schema > column types > oracle
✔ all types should work correctly - persist and hydrate
✔ all types should work correctly - persist and hydrate when options are specified on columns
✔ all types should work correctly - persist and hydrate when types are not specified on columns
database schema > column types > postgres
✔ all types should work correctly - persist and hydrate
✔ all types should work correctly - persist and hydrate when options are specified on columns
✔ all types should work correctly - persist and hydrate when types are not specified on columns
database schema > column types > postgres-enum
✔ should create table with ENUM column and save data to it
✔ should create ENUM column and revert creation
✔ should drop ENUM column and revert drop
✔ should create table with ENUM column and revert creation
✔ should drop table with ENUM column and revert drop
✔ should change non-enum column in to ENUM and revert change
✔ should change ENUM column in to non-enum and revert change
✔ should change ENUM array column in to non-array and revert change
✔ should change ENUM value and revert change
✔ should change `enumName` and revert change
✔ should not create new type if same `enumName` is used more than once
✔ should change both ENUM value and ENUM name and revert change
✔ should rename ENUM when column renamed and revert rename
✔ should rename ENUM when table renamed and revert rename
database schema > column types > sap
✔ all types should work correctly - persist and hydrate
✔ all types should work correctly - persist and hydrate when options are specified on columns
✔ all types should work correctly - persist and hydrate when types are not specified on columns
database schema > column types > spanner
✔ all types should work correctly - persist and hydrate
✔ all types should work correctly - persist and hydrate when options are specified on columns
✔ all types should work correctly - persist and hydrate when types are not specified on columns
database schema > column types > sqlite
✔ all types should work correctly - persist and hydrate
✔ all types should work correctly - persist and hydrate when types are not specified on columns
database schema > column width
✔ all types should be created with correct width
✔ should update data type display width (239ms)
database schema > custom constraint names > foreign key
✓ supports non primary key attributes for joins (targetKey only) (3057ms)
✔ should set custom constraint names
✓ supports non primary key attributes for joins (sourceKey and targetKey) (3068ms)
✔ should load constraints with custom names
- should not change constraint names when table renamed
- should not change constraint names when column renamed
database schema > custom constraint names > index
✔ should set custom constraint names
✔ should load constraints with custom names
✔ should not change constraint names when table renamed (112ms)
✔ should not change constraint names when column renamed (66ms)
database schema > custom constraint names > primary key
✔ should set custom constraint names
✔ should load constraints with custom names
✔ should not change constraint names when table renamed
✔ should not change constraint names when column renamed
database schema > custom constraint names > unique
✔ should set custom constraint names
✔ should load constraints with custom names
✔ should not change constraint names when table renamed (158ms)
✔ should not change constraint names when column renamed (60ms)
database schema > enums
✔ should correctly use default values
✔ should correctly save and retrieve
✔ should not generate queries when no model changes
database schema > enum arrays
✔ should correctly create default values
✔ should correctly save and retrieve
database schema > generated columns > cockroachdb
✔ should not generate queries when no model changes
✔ should create table with generated columns
✔ should add generated column and revert add
✔ should drop generated column and revert drop
✔ should change generated column and revert change
✔ should remove data from 'typeorm_metadata' when table dropped
database schema > generated columns > mssql
✔ should not generate queries when no model changes
✔ should create table with generated columns
✔ should add generated column and revert add
✔ should drop generated column and revert drop
✔ should change generated column and revert change
✔ should remove data from 'typeorm_metadata' when table dropped
database schema > generated columns > mysql
✓ supports non primary key attributes for joins (custom through model) (4580ms)
✓ supports non primary key attributes for joins for getting associations (sourceKey/targetKey) (3041ms)
✔ should not generate queries when no model changes
✔ should create table with generated columns
- should add generated column and revert add
- should drop generated column and revert drop
- should change generated column and revert change
✔ should remove data from 'typeorm_metadata' when table dropped (152ms)
database schema > generated columns > oracle
✔ should not generate queries when no model changes
✔ should create table with generated columns
✔ should add generated column and revert add
✔ should drop generated column and revert drop
✔ should change generated column and revert change
✔ should remove data from 'typeorm_metadata' when table dropped
database schema > generated columns > postgres
✔ should not generate queries when no model changes
✔ should create table with generated columns
✔ should add generated column and revert add
✔ should drop generated column and revert drop
✔ should change generated column and revert change
✔ should remove data from 'typeorm_metadata' when table dropped
database schema > generated columns > spanner
✔ should not generate queries when no model changes
✔ should create table with generated columns
✔ should add generated column and revert add
✔ should drop generated column and revert drop
✔ should change generated column and revert change
✔ should remove data from 'typeorm_metadata' when table dropped
database schema > generated columns > sqlite
✔ should not generate queries when no model changes
✔ should create table with generated columns
✔ should add generated column and revert add
✔ should drop generated column and revert drop
✔ should change generated column and revert change
✔ should remove data from 'typeorm_metadata' when table dropped
database schema > indices > reading index from entity and updating database
✔ should create a non unique index with 2 columns
✓ supports non primary key attributes for joins (custom foreignKey) (3028ms)
✔ should update the index to be unique (1725ms)
✔ should update the index swapping the 2 columns (1522ms)
database schema > mssql-parameters
✔ should correctly insert/update/delete entities on SqlServer driver
database-schema > rowid-column
✔ should create `rowid` generated column
sequences > creating a sequence and marking the column as generated
create table and check that primary key column is marked as generated
✔ should check that the primary key column is generated automatically
database schema > simple-enums
✔ should correctly use default values
✔ should correctly save and retrieve
database schema > simple enum arrays
✔ should correctly create default values
✔ should correctly save and retrieve
decorators > embedded
basic functionality
✔ should persist and load entities with embeddeds properly
✔ should be used with prop
query builder > relation-count-decorator-many-to-many > many-to-many
✔ should load relation count on owner side (45ms)
✓ supports non primary key attributes for joins (custom foreignKey, custom through model) (4534ms)
✓ supports primary key attributes with different field names where parent include is required (461ms)
hasAssociations
- supports transactions
✓ answers false if only some labels have been assigned
✓ answers false if only some labels have been assigned when passing a primary key instead of an object
✓ answers true if all label have been assigned
✓ answers true if all label have been assigned when passing a primary key instead of an object
✓ answers true for labels that have been assigned multitple times (275ms)
✓ answers true for labels that have been assigned multitple times when passing a primary key instead of an object (278ms)
hasAssociations with binary key
✓ answers true for labels that have been assigned
✓ answer false for labels that have not been assigned
countAssociations
✓ should count all associations
✔ should load relation count on owner side with limitation (81ms)
✓ should count filtered associations
✓ should count scoped associations
✔ should load relation count on owner side with additional conditions (171ms)
✓ should count scoped through associations
setAssociations
✓ clears associations when passing null to the set-method (138ms)
✓ should be able to set twice with custom primary keys (129ms)
✔ should load relation count on both sides of relation (71ms)
✓ joins an association with custom primary keys (135ms)
✔ should load relation count on inverse side (65ms)
✓ supports passing the primary key instead of an object (148ms)
✓ using scope to set associations (175ms)
✓ updating association via set associations with scope (179ms)
✓ should catch EmptyResultError when rejectOnEmpty is set (218ms)
createAssociations
✓ creates a new associated object (143ms)
- supports transactions
✓ supports setting through table attributes (133ms)
✔ should load relation count on inverse side with limitation (56ms)
✓ supports using the field parameter (121ms)
addAssociations
✓ supports both single instance and array (116ms)
✔ should load relation count on inverse side with additional conditions (88ms)
decorators > relation-count-decorator > one-to-many
- supports transactions
✓ supports transactions when updating a through model (129ms)
✓ supports passing the primary key instead of an object (121ms)
✓ should not pass indexes to the join table (2819ms)
✓ should catch EmptyResultError when rejectOnEmpty is set (128ms)
✔ should load relation count (74ms)
decorators > relation-id-decorator > many-to-many
✓ should returns array of intermediate table (124ms)
addMultipleAssociations
✔ should load ids when RelationId decorator used on owner side (72ms)
✓ supports both single instance and array (133ms)
✓ adds associations without removing the current ones (160ms)
through model validations
✓ runs on add
✓ runs on set
✓ runs on create
optimizations using bulk create, destroy and update
✓ uses one insert into statement
✓ uses one delete from statement
join table creation
✓ should work with non integer primary keys (598ms)
✓ makes join table non-paranoid by default
✓ should allow creation of a paranoid join table
foreign keys
✓ should correctly generate underscored keys
✓ should infer otherKey from paired BTM relationship with a through string defined
✓ should infer otherKey from paired BTM relationship with a through model defined
foreign key with fields specified
✓ should correctly get associations even after a child instance is deleted (165ms)
✓ should correctly get associations when doubly linked (169ms)
✔ should load ids when RelationId decorator used on owner side with additional condition
✓ should be able to handle nested includes properly (361ms)
✔ should load ids when RelationId decorator used on owner side without inverse side
primary key handling for join table
✓ removes the primary key if it was added by sequelize
✓ keeps the primary key if it was added by the user
without sync
✓ removes all associations
through
paranoid
✓ gets only non-deleted records by default
✓ returns both deleted and non-deleted records with paranoid=false
✔ should load ids when RelationId decorator used on owner side without inverse side and with additional condition
✓ hasAssociation also respects paranoid option
fetching from join table
✓ should contain the data from the join table on .UserProjects a DAO
✓ should be able to alias the default name of the join table
✔ should load ids when RelationId decorator used on inverse side (56ms)
✓ should be able to limit the join table attributes returned
inserting in join table
add
✓ should insert data provided on the object into the join table
✓ should insert data provided as a second argument into the join table
✓ should be able to add twice (second call result in UPDATE call) without any attributes (and timestamps off) on the through model (446ms)
✔ should load ids when RelationId decorator used on inverse side with additional condition (40ms)
✔ should load ids when RelationId decorator used on nested relation (99ms)
✓ should be able to add twice (second call result in UPDATE call) with custom primary keys and without any attributes (and timestamps off) on the through model (481ms)
✔ should not load ids of nested relations when RelationId decorator used on inherit relation and parent relation was not found (49ms)
✓ should be able to create an instance along with its many-to-many association which has an extra column in the junction table (430ms)
✔ should load ids when RelationId decorator used on nested relation with additional conditions (113ms)
decorators > relation-id-decorator > many-to-one
set
✓ should be able to combine properties on the associated objects, and default values
✓ should be able to set twice (second call result in UPDATE calls) without any attributes (and timestamps off) on the through model (562ms)
query with through.where
✓ should support query the through model
removing from the join table
✓ should remove a single entry without any attributes (and timestamps off) on the through model (131ms)
✓ should remove multiple entries without any attributes (and timestamps off) on the through model (148ms)
belongsTo and hasMany at once
source belongs to target
✓ correctly uses bId in A
target belongs to source
✓ correctly uses bId in A
✔ should load ids when RelationId decorator used (46ms)
decorators > relation-id > one-to-many
alias
✓ creates the join table when through is a string (137ms)
✓ creates the join table when through is a model (148ms)
✓ correctly identifies its counterpart when through is a string
✓ correctly identifies its counterpart when through is a model
multiple hasMany
project has owners and users and owners and users have projects
✓ correctly sets user and owner
Foreign key constraints
✓ can cascade deletes both ways by default (225ms)
✓ can restrict deletes both ways (149ms)
✓ can cascade and restrict deletes (145ms)
✓ should be possible to remove all constraints (138ms)
✔ should load id when RelationId decorator used
✓ create custom unique identifier (178ms)
Association options
✓ should throw an error if foreignKey and as result in a name clash
allows the user to provide an attribute definition object as foreignKey
✓ works when taking a column directly from the object
thisAssociations
✓ should work with this reference (102ms)
✓ should work with custom this reference (320ms)
✓ should setup correct foreign keys
Eager loading
✓ should load with an alias (222ms)
✔ should load id when RelationId decorator used with additional condition
decorators > relation-id > one-to-one
✓ should load all (217ms)
✔ should load ids when loadRelationIdAndMap used on owner side
[MYSQL] BelongsTo
Model.associations
✓ should store all associations when associating to the same table multiple times
get
multiple
✓ should fetch associations for multiple instances (177ms)
getAssociation
✓ supports transactions (116ms)
✔ should load id when loadRelationIdAndMap used on inverse side
deferrable uq constraints should be check at the end of transaction
✔ use initially deferred deferrable uq constraints
✔ use initially immediated deferrable uq constraints
deferrable fk constraints should be check at the end of transaction (#2191)
✔ use initially deferred deferrable fk constraints
✔ use initially immediated deferrable fk constraints
MongoDriver
connection string
✔ should create a connection string for replica sets (155ms)
✔ should create a connection string for non replica sets
escape sqlite query parameters
✔ should transform boolean parameters with value `true` into `1`
✔ should transform boolean parameters with value `false` into `0`
✔ should transform boolean nativeParameters with value `true` into `1`
✔ should transform boolean nativeParameters with value `false` into 0
option nativeBinding for better-sqlite3
✔ should use a the path set in nativeBindings to the node file
driver > convert raw results to entity
✔ should return null value in entity property when record column is null
✔ should return true in entity property when record column is true
✓ should be able to handle a where object that's a first class citizen. (96ms)
✔ should return false in entity property when record column is false
DriverUtils
parse mongo url
✔ should return a mongo url with a replica set
✔ should return a mongo url without a replica set
postgres specific options
✔ should set application_name
embedded > basic functionality
✔ should insert, load, update and remove entities with embeddeds properly
other issues > entity listeners must work in embeddeds as well
✓ supports schemas (109ms)
✔ getters and setters should work correctly
embedded > embedded-many-to-many-case1
owner side
✓ supports schemas when defining custom foreign key attribute #9029 (104ms)
setAssociation
✓ supports transactions (101ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToMany relation (53ms)
inverse side
✓ can set the association with declared primary keys... (92ms)
✓ clears the association if null is passed (271ms)
✓ should throw a ForeignKeyConstraintError if the associated record does not exist (108ms)
✓ supports passing the primary key instead of an object (181ms)
✓ should support logging (101ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToMany relation (101ms)
embedded > embedded-many-to-many-case2
owner side
✓ should not clobber atributes (99ms)
✓ should set the foreign key value without saving when using save: false (92ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToMany relation (89ms)
inverse side
✓ supports setting same association twice (96ms)
createAssociation
✓ creates an associated model instance (159ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToMany relation (57ms)
embedded > embedded-many-to-many-case3
owner side
✓ supports transactions (159ms)
foreign key
✓ should setup underscored field with foreign keys when using underscored
✓ should use model name when using camelcase
✓ should support specifying the field of a foreign key (92ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToMany relation with multiple primary keys (one PK in each embed) (54ms)
inverse side
✓ should set foreignKey on foreign table (287ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToMany relation with multiple primary keys (one PK in each embed) (51ms)
embedded > embedded-many-to-many-case4
owner side
foreign key constraints
✓ are enabled by default (117ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToMany relation with multiple primary keys (multiple keys in related entity) (51ms)
inverse side
✓ sets to NO ACTION if allowNull: false (190ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToMany relation with multiple primary keys (multiple keys in related entity) (61ms)
embedded > embedded-many-to-many-case5
owner side
✓ should be possible to disable them (336ms)
✓ can cascade deletes (128ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToMany relation with multiple primary keys (multiple keys in both sides) (66ms)
inverse side
✓ can restrict deletes (100ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToMany relation with multiple primary keys (multiple keys in both sides) (62ms)
embedded > embedded-many-to-one-case1
owner side
✓ can restrict updates (114ms)
✓ can cascade updates (186ms)
association column
✓ has correct type and name for non-id primary keys with non-integer type (83ms)
✓ should support a non-primary key as the association column on a target without a primary key (112ms)
✓ should support a non-primary unique key as the association column (105ms)
✓ should support a non-primary key as the association column with a field option (113ms)
✓ should support a non-primary key as the association column in a table with a composite primary key (98ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToOne relation (47ms)
inverse side
association options
✓ can specify data type for auto-generated relational keys (330ms)
✓ should throw an error if foreignKey and as result in a name clash
✓ should throw an error if an association clashes with the name of an already define attribute
allows the user to provide an attribute definition object as foreignKey
✓ works with a column that hasnt been defined before
✓ works when taking a column directly from the object
✓ works when merging with an existing definition
Eager loading
✓ should load with an alias (271ms)
✓ should load all (105ms)
[MYSQL] HasMany
Model.associations
✓ should store all assocations when associting to the same table multiple times
count
✓ should not fail due to ambiguous field (113ms)
get
multiple
✓ should fetch associations for multiple instances (115ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToOne relation (49ms)
embedded > embedded-many-to-one-case2
owner side
✓ should fetch associations for multiple instances with limit and order (113ms)
✓ should fetch multiple layers of associations with limit and order with separate=true (185ms)
✓ should fetch associations for multiple instances with limit and order and a belongsTo relation (160ms)
✓ supports schemas (229ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToOne relation
inverse side
(1:N)
✓ clears associations when passing null to the set-method with omitNull set to true (124ms)
hasAssociation
✓ should only generate one set of foreignKeys
✓ supports transactions (334ms)
✓ does not have any labels assigned to it initially
✓ answers true if the label has been assigned
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToOne relation (56ms)
embedded > embedded-many-to-one-case3
owner side
✓ answers correctly if the label has been assigned when passing a primary key instead of an object
hasAssociations
✓ supports transactions (209ms)
✓ answers false if only some labels have been assigned
✓ answers false if only some labels have been assigned when passing a primary key instead of an object
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToOne relation with multiple primary keys (one PK in each embed) (38ms)
inverse side
✓ answers true if all label have been assigned
✓ answers true if all label have been assigned when passing a primary key instead of an object
setAssociations
✓ supports transactions (109ms)
✓ clears associations when passing null to the set-method (284ms)
✓ supports passing the primary key instead of an object (136ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToOne relation with multiple primary keys (one PK in each embed) (40ms)
embedded > embedded-many-to-one-case4
owner side
addAssociations
✓ supports transactions (173ms)
✓ supports passing the primary key instead of an object (136ms)
addMultipleAssociations
✓ adds associations without removing the current ones (127ms)
✓ handles decent sized bulk creates (215ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToOne relation with multiple primary keys (multiple keys in related entity) (65ms)
inverse side
createAssociations
✓ creates a new associated object (113ms)
✓ creates the object with the association directly (104ms)
✓ supports transactions (99ms)
✓ supports passing the field option (102ms)
getting assocations with options
✓ should treat the where object of associations as a first class citizen (307ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToOne relation with multiple primary keys (multiple keys in related entity) (50ms)
embedded > embedded-many-to-one-case5
owner side
✓ gets all associated objects when no options are passed
✓ only get objects that fulfill the options
countAssociations
✓ should count all associations
✓ should count filtered associations
✓ should count scoped associations
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToOne relation with multiple primary keys (multiple keys in both sides) (59ms)
inverse side
thisAssociations
✓ should work with alias (117ms)
foreign key constraints
1:m
✓ sets null by default (98ms)
✓ sets to CASCADE if allowNull: false (101ms)
✓ should be possible to remove all constraints (157ms)
✓ can cascade deletes (99ms)
✓ can cascade updates (97ms)
✓ can restrict deletes (105ms)
✓ can restrict updates (102ms)
Association options
✓ should setup underscored field with foreign keys when using underscored
✓ should use model name when using camelcase
✓ can specify data type for auto-generated relational keys (118ms)
✓ infers the keyType if none provided (89ms)
✔ should insert, load, update and remove entities with embeddeds when embedded entity having ManyToOne relation with multiple primary keys (multiple keys in both sides) (49ms)
embedded > embedded-one-to-one
owner side
✓ should throw an error if foreignKey and as result in a name clash
✔ should insert, load, update and remove entities with embeddeds when embedded entity having OneToOne relation
inverse side
- should insert, load, update and remove entities with embeddeds when embedded entity having OneToOne relation
embedded > embedded-with-special-columns
(node:720) [SEQUELIZE0005] DeprecationWarning: Passing a double nested nested array to `group` is unsupported and will be removed in v6.
(Use `node --trace-deprecation ...` to show where the warning was created)
✓ should ignore group from ancestor on deep separated query (181ms)
allows the user to provide an attribute definition object as foreignKey
✓ works with a column that hasnt been defined before
✓ works when taking a column directly from the object
✓ works when merging with an existing definition
sourceKey
✔ should insert, load, update and remove entities with embeddeds when embeds contains special columns (e.g. CreateDateColumn, UpdateDateColumn, DeleteDateColumn, VersionColumn (1036ms)
embedded > multiple-primary-column
✔ should insert, load, update and remove entities with embeddeds when primary column defined in main and in embedded entities (42ms)
embedded > multiple-primary-columns-with-nested-embed
✔ should insert, load, update and remove entities with embeddeds when primary column defined in main and in embedded entities (38ms)
other issues > entity listeners must work in optional embeddeds as well
✔ getters and setters should work correctly
embedded > outer-primary-column
✔ should insert, load, update and remove entities with embeddeds when primary column defined only in embedded entity
embedded > prefix functionality
✔ should insert, load, update and remove entities with embeddeds properly
entity-listeners
✔ beforeUpdate
entity-metadata > create
without entitySkipConstructor
✔ should call the constructor when creating an object
✔ should set the default property values
✔ should call the constructor when retrieving an object
with entitySkipConstructor
✔ should call the constructor when creating an object
✔ should set the default property values when creating an object
✔ should not call the constructor when retrieving an object
entity-metadata > property-map
✓ should use sourceKey
✔ should create correct property map object
entity-metadata-validator
✔ should throw error if relation count decorator used with ManyToOne or OneToOne relations
entity-metadata-validator > initialized relations
✔ should throw error if relation with initialized array was found on many-to-many relation
✔ should throw error if relation with initialized array was found on one-to-many relation
✔ should not throw error if relation with initialized array was not found
✔ should not throw error if relation with initialized array was found, but persistence for this relation was disabled
entity-model
✔ should save successfully and use static methods successfully
✓ should count related records
✔ should reload given entity successfully (658ms)
✓ should set right field when add relative
✔ should reload exactly the same entity (568ms)
upsert
✔ should upsert successfully
entity schemas > basic functionality
✓ should create with nested associated models (89ms)
✔ should perform basic operations with entity using repository (44ms)
✔ should perform basic operations with entity using manager
entity-schema > checks
entity-schema > checks > postgres, cockroachdb, oracle, mssql
✔ should create a check constraints
entity-schema > checks > spanner
✔ should create a check constraints
entity-schema > columns > mysql
✔ should create columns with different options
entity schema > custom constraint names > foreign key
✔ should set custom constraint names
✓ should create nested associations with symmetric getters/setters on FK (1921ms)
sourceKey with where clause in include
✓ should use the specified sourceKey instead of the primary key
Eager loading
✓ should load with an alias (195ms)
✓ should load all (131ms)
✔ should load constraints with custom names
- should not change constraint names when table renamed
- should not change constraint names when column renamed
entity schema > custom constraint names > index
✔ should set custom constraint names
✔ should load constraints with custom names
[MYSQL] HasOne
Model.associations
✓ should store all associations when associating to the same table multiple times
get
multiple
✔ should not change constraint names when table renamed (92ms)
✓ should fetch associations for multiple instances (208ms)
getAssociation
✔ should not change constraint names when column renamed (60ms)
database schema > custom constraint names > primary key
✔ should set custom constraint names
✔ should load constraints with custom names
✔ should not change constraint names when table renamed
✔ should not change constraint names when column renamed
database schema > custom constraint names > unique
✔ should set custom constraint names
✓ supports transactions (150ms)
✔ should load constraints with custom names
✓ should be able to handle a where object that's a first class citizen. (118ms)
✔ should not change constraint names when table renamed (82ms)
✓ supports schemas (120ms)
✔ should not change constraint names when column renamed (70ms)
entity-schema > embedded - class-instance
✔ should create an table
setAssociation
✔ should not create table with embedded
✔ should create embedded column name with prefix
✓ supports transactions (133ms)
✔ should create index for embedded
entity-schema > embedded - class-instance
✔ should save entity with embedded
✓ can set an association with predefined primary keys (118ms)
✔ should contains instance of target class embedded entity
entity-schema > embedded - plain-object
✓ clears the association if null is passed (113ms)
✔ should save entity with embedded
✔ should contains instance of plain object for embedded entity
entity-schema > exclusions
✔ should create an exclusion constraint
entity-schema > indices > basic
✓ should throw a ForeignKeyConstraintError if the associated record does not exist (108ms)
✔ should create a non unique index with 2 columns
✓ supports passing the primary key instead of an object (116ms)
✓ supports updating with a primary key instead of an object (189ms)
✓ supports setting same association twice (206ms)
createAssociation
✓ creates an associated model instance (107ms)
✓ supports transactions (111ms)
foreign key
✓ should setup underscored field with foreign keys when using underscored
✓ should use model name when using camelcase
✓ should support specifying the field of a foreign key (331ms)
✓ should support custom primary key field name in sub queries (109ms)
foreign key constraints
✓ are enabled by default (109ms)
✓ sets to CASCADE if allowNull: false (122ms)
✔ should update the index to be unique (4110ms)
✔ should update the index swaping the 2 columns (1534ms)
entity-schema > indices > mysql
- should correctly create SPATIAL and FULLTEXT indices
entity schemas > target option
✔ should create instance of the target
✔ should find instances of the target
entity-schema > uniques
✔ should create an unique constraint with 2 columns
entity subscriber > query data
✔ passes query data to subscriber
✔ cleans up the data after the save completes
entity subscriber > transaction flow
✔ transactionStart
✔ transactionCommit
✔ transactionRollback
errors > prototype tree
✔ prototype tree makes sense
find options > find operators > ArrayContainedBy
✔ should find entries in regular arrays
✔ should find entries in enum arrays
find options > find operators > ArrayContains
✔ should find entries in regular arrays
✔ should find entries in enum arrays
find options > find operators > ArrayOverlap
✔ should find entries in regular arrays
✔ should find entries in enum arrays
find options > order
✓ should be possible to disable them (755ms)
✓ can cascade deletes (114ms)
✓ works when cascading a delete with hooks but there is no associate (i.e. "has zero") (125ms)
✓ can cascade updates (100ms)
✓ can restrict deletes (108ms)
✓ can restrict updates (111ms)
association column
✓ has correct type for non-id primary keys with non-integer type (99ms)
✓ should support a non-primary key as the association column on a target with custom primary key (111ms)
✓ should support a non-primary unique key as the association column (131ms)
✓ should support a non-primary unique key as the association column with a field option (114ms)
Association options
✓ can specify data type for autogenerated relational keys (106ms)
✓ should throw an error if an association clashes with the name of an already define attribute
allows the user to provide an attribute definition object as foreignKey
✓ works with a column that hasnt been defined before
✓ works when taking a column directly from the object
✓ works when merging with an existing definition
Counter part
BelongsTo
✓ should only generate one foreign key
Eager loading
✓ should load with an alias (117ms)
✓ should load all (111ms)
[MYSQL] Multiple Level Filters
✓ can filter through belongsTo (431ms)
✔ order by id DESC (58ms)
✓ avoids duplicated tables in query (164ms)
✓ can filter through hasMany (214ms)
✓ can filter through hasMany connector (339ms)
[MYSQL] associations
scope
1:1
✓ should create, find and include associations with scope values (415ms)
✔ order by title (63ms)
✓ should create included association with scope values (2151ms)
1:M
✓ should create, find and include associations with scope values (229ms)
✓ should make the same query if called multiple time (#4470) (306ms)
✓ should created included association with scope values (286ms)
✔ where two criteria (91ms)
✓ should include associations with operator scope values (213ms)
✓ should not mutate scope when running SELECT query (#12868) (216ms)
N:M
on the target
✓ [Flaky] should create, find and include associations with scope values (174ms)
on the through model
✓ should create, find and include associations with scope values (329ms)
[MYSQL] Self
✓ supports freezeTableName (66ms)
✓ can handle 1:m associations (73ms)
✓ can handle n:m associations (126ms)
✓ can handle n:m associations with pre-defined through table (220ms)
[MYSQL] CLS (Async hooks)
✔ order by relation (65ms)
✓ CLS namespace is stored in Sequelize._cls
✓ promises returned by sequelize.query are correctly patched
✓ custom logging with benchmarking has correct CLS context (505ms)
context
✓ does not use continuation storage on manually managed transactions
✓ supports several concurrent transactions
✓ supports nested promise chains
✓ does not leak variables to the outer scope (503ms)
✓ does not leak variables to the following promise chain
✓ does not leak outside findOrCreate
sequelize.query integration
✓ automagically uses the transaction in all calls
✓ automagically uses the transaction in all calls with async/await
Model Hook integration
✓ passes the transaction to hooks {beforeBulkCreate,beforeCreate,afterCreate,afterBulkCreate} when calling Model.bulkCreate
✓ passes the transaction to hooks {beforeFind,beforeFindAfterExpandIncludeAll,beforeFindAfterOptions} when calling Model.findAll
✓ passes the transaction to hooks {afterFind} when calling Model.findAll
✓ passes the transaction to hooks {beforeCount} when calling Model.count
✓ passes the transaction to hooks {beforeUpsert,afterUpsert} when calling Model.upsert
✓ passes the transaction to hooks {beforeBulkDestroy,afterBulkDestroy} when calling Model.destroy
✓ passes the transaction to hooks {beforeDestroy,beforeDestroy} when calling Model.destroy with individualHooks
✓ passes the transaction to hooks {beforeDestroy,beforeDestroy} when calling Model#destroy
✓ passes the transaction to hooks {beforeBulkUpdate,afterBulkUpdate} when calling Model.update
✔ order by relation with where relation applied (76ms)
✓ passes the transaction to hooks {beforeUpdate,afterUpdate} when calling Model.update with individualHooks
✓ passes the transaction to hooks {beforeCreate,afterCreate} when calling Model#save (isNewRecord)
✓ passes the transaction to hooks {beforeUpdate,afterUpdate} when calling Model#save (!isNewRecord)
paranoid restore
✓ passes the transaction to hooks {beforeBulkRestore,afterBulkRestore} when calling Model.restore
✓ passes the transaction to hooks {beforeRestore,afterRestore} when calling Model.restore with individualHooks
✓ passes the transaction to hooks {beforeRestore,afterRestore} when calling Model#restore
[MYSQL] Configuration
Connections problems should fail with a nice message
✓ when we don't have the correct server details
✓ when we don't have the correct login information
✓ when we don't have a valid dialect.
[MYSQL] DataTypes
✓ allows me to return values from a custom parse function (1065ms)
✓ calls parse and stringify for JSON (147ms)
✓ calls parse and stringify for DATE (137ms)
✓ calls parse and stringify for DATEONLY (57ms)
✓ calls parse and stringify for TIME (64ms)
✓ calls parse and stringify for BLOB (439ms)
✔ order by nested relations (62ms)
✓ calls parse and stringify for CHAR (61ms)
✓ calls parse and stringify/bindParam for STRING (138ms)
✓ calls parse and stringify for TEXT (52ms)
✓ calls parse and stringify for BOOLEAN (49ms)
✓ calls parse and stringify for INTEGER (57ms)
✓ calls parse and stringify for DECIMAL (56ms)
✓ calls parse and stringify for BIGINT (58ms)
✓ should handle JS BigInt type (54ms)
✓ should handle TINYINT booleans (60ms)
✓ calls parse and bindParam for DOUBLE (56ms)
✓ calls parse and bindParam for FLOAT (62ms)
✓ calls parse and bindParam for REAL (49ms)
✓ calls parse and stringify for UUID
✓ calls parse and stringify for CIDR
✓ calls parse and stringify for INET
✓ calls parse and stringify for CITEXT
✓ calls parse and stringify for MACADDR
✓ calls parse and stringify for ENUM
✓ should parse DECIMAL as string (59ms)
✓ should parse BIGINT as string (51ms)
✓ should allow spaces in ENUM (40ms)
✓ should return YYYY-MM-DD format string for DATEONLY (55ms)
✓ should return set DATEONLY field to NULL correctly (67ms)
✓ should be able to cast buffer as boolean (126ms)
[MYSQL] Connection Manager
✓ should initialize a single pool without replication
✓ should initialize a multiple pools with replication
✓ should round robin calls to the read pool
✓ should trigger deprecation for non supported engine version
✓ should allow forced reads from the write pool
✓ should clear the pool after draining it
[MYSQL Specific] Associations
many-to-many
where tables have the same prefix
✓ should create a table wp_table1wp_table2s (190ms)
when join table name is specified
✓ should not use only a specified name
HasMany
addDAO / getModel
✓ should correctly add an association to the dao
removeDAO
✓ should correctly remove associated objects
[MYSQL Specific] Connection Manager
✓ -FOUND_ROWS can be suppressed to get back legacy behavior (62ms)
✔ order by complex nested relations (58ms)
✓ should acquire a valid connection when keepDefaultTimezone is true
[MYSQL Specific] DAOFactory
constructor
✓ handles extended attributes (unique)
✓ handles extended attributes (default)
✓ handles extended attributes (null)
✓ handles extended attributes (primaryKey)
✓ adds timestamps
✓ adds deletedAt if paranoid
✓ underscores timestamps if underscored
✓ omits text fields with defaultValues
✓ omits blobs fields with defaultValues
primaryKeys
✓ determines the correct primaryKeys
[MYSQL Specific] Errors
ForeignKeyConstraintError
✓ in context of DELETE restriction (171ms)
✓ in context of missing relation (163ms)
[MYSQL] Warning
logging
Executing (default): DROP TABLE IF EXISTS `models`;
Executing (default): SHOW WARNINGS
MySQL Warnings (default): Unknown table 'sequelize_test.models'; Unknown table 'sequelize_test.models'
Executing (default): SELECT CONSTRAINT_NAME as constraint_name,CONSTRAINT_NAME as constraintName,CONSTRAINT_SCHEMA as constraintSchema,CONSTRAINT_SCHEMA as constraintCatalog,TABLE_NAME as tableName,TABLE_SCHEMA as tableSchema,TABLE_SCHEMA as tableCatalog,COLUMN_NAME as columnName,REFERENCED_TABLE_SCHEMA as referencedTableSchema,REFERENCED_TABLE_SCHEMA as referencedTableCatalog,REFERENCED_TABLE_NAME as referencedTableName,REFERENCED_COLUMN_NAME as referencedColumnName FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = 'models' AND CONSTRAINT_NAME!='PRIMARY' AND CONSTRAINT_SCHEMA='sequelize_test' AND REFERENCED_TABLE_NAME IS NOT NULL;
Executing (default): DROP TABLE IF EXISTS `models`;
Executing (default): SHOW WARNINGS
MySQL Warnings (default): Unknown table 'sequelize_test.models'; Unknown table 'sequelize_test.models'
Executing (default): DROP TABLE IF EXISTS `models`;
Executing (default): SHOW WARNINGS
MySQL Warnings (default): Unknown table 'sequelize_test.models'; Unknown table 'sequelize_test.models'
Executing (default): CREATE TABLE IF NOT EXISTS `models` (`id` INTEGER NOT NULL auto_increment , `name` VARCHAR(1) BINARY, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB;
Executing (default): SHOW INDEX FROM `models`
Executing (default): SELECT 1+1 AS result
Executing (default): SET SESSION sql_mode='';
Executing (default): INSERT INTO `models` (`id`,`name`,`createdAt`,`updatedAt`) VALUES (DEFAULT,?,?,?);
Executing (default): SHOW WARNINGS
MySQL Warnings (default):
✓ logs warnings when there are warnings (67ms)
[MYSQL] Sequelize Errors
API Surface
✓ Should have the Error constructors exposed
✓ Sequelize Errors instances should be instances of Error
✓ SequelizeValidationError should find errors by path
✓ SequelizeValidationError should override message property when message parameter is specified
✓ SequelizeValidationError should concatenate an error messages from given errors if no explicit message is defined
✓ SequelizeValidationErrorItem does not require instance & validator constructor parameters
✓ SequelizeValidationErrorItem should have instance, key & validator properties when given to constructor
✓ SequelizeValidationErrorItem.getValidatorKey() should return a string
✓ SequelizeValidationErrorItem.getValidatorKey() should throw if namespace separator is invalid (only if NS is used & available)
✓ SequelizeValidationErrorItem should map deprecated "type" values to new "origin" values
✓ SequelizeValidationErrorItemOrigin is valid
✓ SequelizeValidationErrorItem.Origins is valid
✓ SequelizeDatabaseError should keep original message
✓ SequelizeDatabaseError should keep the original sql and the parameters
✓ ConnectionError should keep original message
✓ ConnectionRefusedError should keep original message
✓ AccessDeniedError should keep original message
✓ HostNotFoundError should keep original message
✓ HostNotReachableError should keep original message
✓ InvalidConnectionError should keep original message
✓ ConnectionTimedOutError should keep original message
OptimisticLockError
✓ got correct error type and message (145ms)
ConstraintError
✓ Can be intercepted as UniqueConstraintError using .catch (145ms)
✓ Can be intercepted as ValidationError using .catch (51ms)
✓ Supports newlines in keys (54ms)
✓ Works when unique keys are not defined in sequelize (141ms)
✓ adds parent and sql properties (140ms)
[MYSQL] Hooks
associations
1:1
cascade onUpdate
✓ on success
✔ order by column in embed (55ms)
✓ on error
cascade onDelete
#remove
✓ with no errors
✓ with errors
no cascade update
✓ on success
✔ order by relation in embed (61ms)
find options > relations
✓ on error
no cascade delete
#remove
✓ with no errors
✓ with errors
1:M
cascade
#remove
✓ with no errors
✓ with errors
no cascade
#remove
✔ basic relation (55ms)
✓ with no errors
✓ with errors
M:M
cascade
#remove
✓ with no errors
✔ complex relation #1 (50ms)
✓ with errors
no cascade
#remove
✓ with no errors
✔ complex relation #2 (52ms)
✓ with errors
multiple 1:M
cascade
#remove
✓ with no errors
✓ with errors
multiple 1:M sequential hooks
cascade
#remove
✓ with no errors (87ms)
✔ relation in embed (57ms)
find options > select
✓ with errors
[MYSQL] Hooks
#bulkCreate
on success
✓ should run hooks
on error
✓ should return an error from before
✔ select id (61ms)
✓ should return an error from after
with the {individualHooks: true} option
✓ should run the afterCreate/beforeCreate functions for each item created successfully
✓ should run the afterCreate/beforeCreate functions for each item created with an error
#bulkUpdate
on success
✓ should run hooks
on error
✓ should return an error from before
✓ should return an error from after
with the {individualHooks: true} option
✓ should run the after/before functions for each item created successfully
✓ should run the after/before functions for each item created successfully changing some data before updating
✓ should run the after/before functions for each item created with an error
#bulkDestroy
on success
✓ should run hooks
on error
✓ should return an error from before
✔ select title (51ms)
✓ should return an error from after
with the {individualHooks: true} option
✓ should run the after/before functions for each item created successfully
✓ should run the after/before functions for each item created with an error
#bulkRestore
on success
✓ should run hooks
on error
✓ should return an error from before
✓ should return an error from after
with the {individualHooks: true} option
✔ select title and text (52ms)
✓ should run the after/before functions for each item restored successfully
✓ should run the after/before functions for each item restored with an error
[MYSQL] Hooks
#count
on success
✓ hook runs
✓ beforeCount hook can change options
on error
✓ in beforeCount hook returns error
[MYSQL] Hooks
#create
✓ should not trigger hooks on parent when using N:M association setters (580ms)
on success
✓ should run hooks
on error
✓ should return an error from before
✓ should return an error from after
preserves changes to instance
✓ beforeValidate
✓ afterValidate
✔ select column in embed (60ms)
find options > where
✓ beforeCreate
✓ beforeSave
✓ beforeSave with beforeCreate
[MYSQL] Hooks
#destroy
on success
✓ should run hooks
on error
✓ should return an error from before
✓ should return an error from after
with paranoid mode enabled
✓ sets other changed values when soft deleting and a beforeDestroy hooks kicks in (61ms)
✓ should not throw error when a beforeDestroy hook changes a virtual column (221ms)
[MYSQL] Hooks
#find
✓ allow changing attributes via beforeFind #5675
on success
✓ all hooks run
✓ beforeFind hook can change options
✓ beforeFindAfterExpandIncludeAll hook can change options
✓ beforeFindAfterOptions hook can change options
✓ afterFind hook can change results
on error
✓ in beforeFind hook returns error
✓ in beforeFindAfterExpandIncludeAll hook returns error
✓ in beforeFindAfterOptions hook returns error
✓ in afterFind hook returns error
[MYSQL] Hooks
#define
✓ beforeDefine hook can change model name
✓ beforeDefine hook can alter options
✓ beforeDefine hook can alter attributes
✔ where id (49ms)
✓ afterDefine hook can alter options
#init
✓ beforeInit hook can alter config
✓ beforeInit hook can alter options
✓ afterInit hook can alter options
passing DAO instances
beforeValidate / afterValidate
✓ should pass a DAO instance to the hook (156ms)
beforeCreate / afterCreate
✓ should pass a DAO instance to the hook (146ms)
beforeDestroy / afterDestroy
✓ should pass a DAO instance to the hook (315ms)
beforeUpdate / afterUpdate
✓ should pass a DAO instance to the hook (162ms)
Model#sync
on success
✓ should run hooks
✓ should not run hooks when "hooks = false" option passed
✔ where title (85ms)
on error
✓ should return an error from before
✓ should return an error from after
sequelize#sync
on success
✓ should run hooks
✓ should not run hooks if "hooks = false" option passed
on error
✓ should return an error from before
✓ should return an error from after
#removal
✓ should be able to remove by name
✓ should be able to remove by reference
✓ should be able to remove proxies
Sequelize hooks
✓ should run before/afterPoolAcquire hooks
✔ where two criteria (63ms)
[MYSQL] Hooks
#restore
on success
✓ should run hooks
on error
✓ should return an error from before (98ms)
✓ should return an error from after
[MYSQL] Hooks
#update
on success
✓ should run hooks
on error
✓ should return an error from before
✓ should return an error from after
preserves changes to instance
✓ beforeValidate
✓ afterValidate
✓ beforeSave
✓ beforeSave with beforeUpdate
[MYSQL] Hooks
#upsert
on success
✓ should run hooks
on error
✓ should return an error from before
✓ should return an error from after
preserves changes to values
✓ beforeUpsert
✔ where two criteria without match (80ms)
[MYSQL] Hooks
#validate
#create
✓ should return the user
#3534, hooks modifications
✓ fields modified in hooks are saved
on error
✓ should emit an error from after hook
✓ should call validationFailed hook
✓ should not replace the validation error in validationFailed hook by default
✓ should replace the validation error if validationFailed hook creates a new error
[MYSQL] Include
find
✓ should support an empty belongsTo include (154ms)
✓ should support a belongsTo association reference (155ms)
✓ should support to use associations with Sequelize.col (314ms)
✓ should support a belongsTo association reference with a where (152ms)
✓ should support a empty hasOne include (320ms)
✔ where relation (94ms)
✓ should support a hasOne association reference (249ms)
✓ should support including a belongsTo association rather than a model/as pair (152ms)
✓ should support a hasMany association reference (261ms)
✓ should support a hasMany association reference with a where condition (171ms)
✓ should support a belongsToMany association reference (232ms)
✓ should support a simple nested belongsTo -> belongsTo include (254ms)
✔ where column and relation (64ms)
✓ should support a simple sibling set of belongsTo include (1121ms)
✓ should support a simple nested hasOne -> hasOne include (266ms)
✓ should support a simple nested hasMany -> belongsTo include (453ms)
✔ where nested relations (65ms)
✓ should support a simple nested belongsTo -> hasMany include (256ms)
✓ should support a simple nested hasMany to hasMany include (392ms)
✓ should support an include with multiple different association types (719ms)
✓ should support specifying attributes (401ms)
✓ should support Sequelize.literal and renaming of attributes in included model attributes (148ms)
✓ should support self associated hasMany (with through) include (167ms)
✔ where complex nested relations (114ms)
✓ should support including date fields, with the correct timeszone (319ms)
✓ should support include when retrieving associated objects (241ms)
where
✓ should support Sequelize.and()
✓ should support Sequelize.or()
findAndCountAll
✓ should include associations to findAndCountAll (143ms)
association getter
✓ should support getting an include on a N:M association getter (344ms)
right join
✓ should support getting an include with a right join (149ms)
✔ where or + optional relations (63ms)
✓ should support getting an include through with a right join (206ms)
nested includes
✓ should not ripple grandchild required to top level find when required of child is set to false
✓ should support eager loading associations using the name of the relation (string)
✓ should not ripple grandchild required to top level find when required of child is not given (implicitly false)
✓ should ripple grandchild required to top level find when required of child is set to true as well
[MYSQL] Include
findAll
✔ where column in embed (58ms)
✓ should work on a nested set of relations with a where condition in between relations (535ms)
✓ should accept nested `where` and `limit` at the same time (298ms)
✓ should support an include with multiple different association types (883ms)
✔ where relation in embed (66ms)
✓ should support many levels of belongsTo (877ms)
✓ should support many levels of belongsTo (with a lower level having a where) (1057ms)
✔ where complex with or + and (86ms)
✓ should support ordering with only belongsTo includes (429ms)
✓ should include attributes from through models (251ms)
✓ should support a required belongsTo include (247ms)
✓ should be possible to extend the on clause with a where option on a belongsTo include (232ms)
✓ should be possible to extend the on clause with a where option on a belongsTo include (234ms)
✓ should be possible to define a belongsTo include as required with child hasMany not required (256ms)
✔ where relations with operators (87ms)
✓ should be possible to define a belongsTo include as required with child hasMany with limit (345ms)
✓ should be possible to define a belongsTo include as required with child hasMany with limit and aliases (273ms)
✓ should be possible to define a belongsTo include as required with child hasMany which is not required with limit (331ms)
✓ should be possible to extend the on clause with a where option on a hasOne include (282ms)
✓ should be possible to extend the on clause with a where option on a hasMany include with a through model (284ms)
✓ should be possible to extend the on clause with a where option on nested includes (823ms)
✔ should not apply inner join if all conditions return undefined (82ms)
✓ should be possible to use limit and a where with a belongsTo include (196ms)
✓ should be possible use limit, attributes and a where on a belongsTo with additional hasMany includes (1612ms)
✔ should apply inner join if true is applied (88ms)
find options > where
✔ should skip undefined properties
✔ should skip null properties
find options > opaque-types-over-primitives
✔ should work in select
✓ should be possible to have the primary key in attributes (279ms)
✔ should work in where
✔ should work in order by
indices > basic unique index test
unique index
✔ should work without errors
indices > conditional index
✔ should correctly create conditional indices with WHERE condition
✔ should correctly drop conditional indices and revert drop
indices > embeds index test
embeddeds index
✔ should work without errors
indices > fulltext index
- should correctly create fulltext indices
- with default parser
- with ngram parser
jsonb type
✔ should make correct schema with Postgres' jsonb type
✔ should persist jsonb correctly
✔ should persist jsonb string correctly
✔ should persist jsonb array correctly
✔ should create updates when changing object
✔ should not create updates when resorting object
✔ should not create new migrations when everything is equivalent
json > defaults
✔ should insert default values properly
ltree-postgres
✔ should create correct schema with Postgres' ltree type
✔ should persist ltree correctly
✔ should update ltree correctly
✔ should re-save ltree correctly
✔ should persist ltree correctly with trailing '.'
✔ should persist ltree correctly when containing spaces
✔ should be able to query ltree correctly
metadata-builder > ColumnMetadata
✔ getValue
✔ getValueMap
metadata builder > MetadataArgsUtils
✔ getInheritanceTree
✔ filterByTargetClasses
migrations > generate command
✔ can recognize model changes
✔ does not generate when no model changes (335ms)
migrations > show command
✔ can recognise pending migrations
✔ can recognise no pending migrations
mongodb > array columns
✔ should insert / update array columns correctly
✔ should retrieve arrays from the column metadata
mongodb > embedded columns
✔ should insert / update / remove entity with embedded correctly
✔ should store results in correct camelCase format
✔ should transform results to correct boolean value
✔ should transform entity with nested embedded columns correctly
mongodb > embedded columns listeners
✔ should work listeners in entity embeddeds correctly
✔ should not work listeners in entity embeddeds if property is optional
✔ should work listeners in entity array embeddeds correctly
mongodb > embeddeds indices
✔ should insert entity with embeddeds indices correctly
mongodb > indices
✔ should insert entity with indices correctly
mongodb > MongoRepository
✔ connection should return mongo repository when requested
✔ entity manager should return mongo repository when requested
✔ should be able to use entity cursor which will return instances of entity classes
✔ should be able to use entity cursor which will return instances of entity classes
✔ should be able to use findByIds with both ObjectId and strings
✔ should be able to save and update mongo entities
✔ should ignore non-column properties
with DeletedDataColumn
✔ with $or query
✔ filter delete data
findOne filtered data properly
✔ findOne()
✔ findOneBy()
mongodb > object id columns
✔ should persist ObjectIdColumn property as _id to DB
✔ should map _id to ObjectIdColumn property and remove BD _id property
✔ should save and load properly if objectId property has name _id
✔ should not persist entity ObjectIdColumn property in DB on update by save
mongodb > basic repository actions
✔ create should create instance of same entity
✔ create should be able to fill data from the given object
✔ merge should merge all given partial objects into given source entity
✔ merge should merge all given recursive partial objects into given source entity
✔ target should be valid
✔ should persist entity successfully and after persistence have generated object id
✔ hasId should return true if id really has an id
✔ unsupported methods should throw exception
✔ should return persisted objects using find* methods
✔ should sort entities in a query
✔ clear should remove all persisted entities
✔ remove should remove given entity
✔ clear should remove all persisted entities
✔ preload should pre-load given object
mongodb > timestampable columns
✔ should persist timestampable columns
multi-database > basic-functionality
filepathToName()
✔ produces deterministic, unique, and valid table names for relative paths; leaves absolute paths unchanged (darwin)
✔ produces deterministic, unique, and valid table names for relative paths; leaves absolute paths unchanged (win32)
multiple databases
✔ should correctly attach and create database files
✔ should prefix tableName when custom database used in Entity decorator
✔ should not affect tableName when using default main database
✔ should create foreign keys for relations within the same database
multi-schema-and-database > custom-junction-database
✓ should be possible to turn off the attributes for the through table (1559ms)
✔ should correctly create tables when custom table schema used
multi-schema-and-database > custom-junction-schema
✔ should correctly create tables when custom table schema used
multi-schema-and-database > basic-functionality
custom-table-schema
✔ should set the table database / schema
✔ should correctly get the table primary keys when custom table schema used
✔ should correctly create tables when custom table schema used
✔ should correctly create tables when custom table schema used in Entity decorator
✔ should correctly work with cross-schema queries
✔ should correctly work with QueryBuilder
custom-table-schema-and-database
✔ should set the table database / schema
✔ should correctly get the table primary keys when custom table schema used
✔ should correctly create tables when custom database and custom schema used in Entity decorator
✔ should correctly work with cross-schema and cross-database queries in QueryBuilder
custom-database
✔ should correctly create tables when custom database used in Entity decorator
LegacyOracleNamingStrategy > column shortening
✔ should truncate column names to the limit
✔ should change column names to hashes within the limit
LegacyOracleNamingStrategy > create table using this naming strategy
✔ should create the table
LegacyOracleNamingStrategy > create table using default naming strategy
✔ should not create the table and fail due to ORA-00972
persistence > basic functionality
✔ should save an entity
✔ should remove an entity
✔ should throw an error when not an object is passed to a save method
✔ should throw an error when not an object is passed to a remove method
✔ should throw an exception if object literal is given instead of constructed entity because it cannot determine what to save
✔ should be able to save and remove entities of different types
persistence > bulk-insert-remove-optimization
✔ should group multiple insert and remove queries
persistence > cascades > example 1
✔ should insert everything by cascades properly
persistence > cascades > example 2
✓ should be possible to select on columns inside a through table (1367ms)
✓ should be possible to select on columns inside a through table and a limit (2534ms)
✓ should be possible not to include the main id in the attributes (188ms)
✔ should insert everything by cascades properly
persistence > cascades > remove
- should remove everything by cascades properly
persistence > cascades > remove
- should soft-remove everything by cascades properly
persistence > cascade operations with custom name
cascade update
✓ should be possible to use limit and a where on a hasMany with additional includes (1096ms)
✔ should remove relation
persistence > entity updation
✔ should update generated auto-increment id after saving
✔ should update generated uuid after saving
✔ should update default values after saving
✓ should be possible to use limit and a where on a hasMany with a through model with additional includes (1651ms)
✔ should update special columns after saving
✔ should update even when multiple primary keys are used
✓ should support including date fields, with the correct timeszone (256ms)
✔ should update even with embeddeds
persistence > insert > update-relation-columns-after-insertion
✓ should still pull the main record(s) when an included model is not required and has where restrictions without matches (264ms)
✓ should work with paranoid, a main record where, an include where, and a limit (190ms)
✓ should work on a nested set of required 1:1 relations (346ms)
✔ should work perfectly
persistence > many-to-many
✓ should work with an empty include.where (310ms)
✓ should be able to order on the main table and a required belongsTo relation with custom tablenames and limit (157ms)
✓ should ignore include with attributes: [] (used for aggregates) (157ms)
✔ add exist element to exist object with empty many-to-many relation and save it and it should contain a new category
✓ should ignore include with attributes: [] and through: { attributes: [] } (used for aggregates) (331ms)
✓ should not add primary key when including and aggregating with raw: true (270ms)
✓ should return posts with nested include with inner join with a m:n association (418ms)
✔ remove one element from many-to-many relation should remove from the database as well (56ms)
✓ should be able to generate a correct request with inner and outer join (351ms)
✔ remove all elements from many-to-many relation should remove from the database as well (63ms)
✓ should be able to generate a correct request for entity with 1:n and m:1 associations and limit (1554ms)
✔ remove all elements (set to null) from many-to-many relation should remove from the database as well (60ms)
✓ should allow through model to be paranoid (458ms)
[MYSQL] Include
findAndCountAll
✓ should be able to include two required models with a limit. Result rows should match limit. (287ms)
✓ should be able to include a required model. Result rows should match count (753ms)
✔ remove all elements from many-to-many relation if parent entity is removed (50ms)
persistence > many-to-one bi-directional relation
✓ should count on a where and not use an uneeded include (191ms)
✓ should return the correct count and rows when using a required belongsTo and a limit (271ms)
✓ should return the correct count and rows when using a required belongsTo with a where condition and a limit (157ms)
✓ should correctly filter, limit and sort when multiple includes and types of associations are present. (415ms)
✔ should save a category with a post attached
✓ should properly work with sequelize.function (201ms)
[MYSQL] Include
findOne
✔ should save a category and a new post by cascades
✓ should include a non required model, with conditions and two includes N:M 1:M (487ms)
✓ should work with a 1:M to M:1 relation with a where on the last include (410ms)
✔ should update exist post by cascades when category is saved
✓ should include a model with a where condition but no required (233ms)
✓ should include a model with a where clause when the PK field name and attribute name are different (433ms)
✔ should NOT remove exist post by cascades when category is saved without a post (post is set to undefined)
✓ should include a model with a through.where and required true clause when the PK field name and attribute name are different (577ms)
✓ should still pull the main record when an included model is not required and has where restrictions without matches (361ms)
✔ should unset exist post when its set to null
✓ should support a nested include (with a where) (446ms)
✓ should support a belongsTo with the targetKey option (280ms)
✔ should set category's post to NULL when post is removed from the database (database ON DELETE)
✓ should support many levels of belongsTo (with a lower level having a where) (1172ms)
✔ should work when relation id is directly set into relation (without related object)
persistence > many-to-one uni-directional relation
✓ should work with combinding a where and a scope (141ms)
[MYSQL] Include
LIMIT
✔ should save a category with a post attached
✓ supports many-to-many association with where clause (1338ms)
✔ should save a category and a new post by cascades
✔ should update exist post by cascades when category is saved
✓ supports 2 levels of required many-to-many associations (1769ms)
✔ should NOT remove exist post by cascades when category is saved without a post (post is set to undefined)
✔ should unset exist post when its set to null
✔ should set category's post to NULL when post is removed from the database (database ON DELETE)
✓ supports 2 levels of required many-to-many associations with where clause (1439ms)
✔ should work when relation id is directly set into relation (without related object)
persistence > multi primary keys
insert
✔ should insert entity when there are multi column primary keys
persistence > multi primary keys on both sides
insert
✔ should insert entity when there are multi column primary keys
persistence > null and default behaviour
✔ should insert value if it is set
✔ should insert default when post.title is undefined
✔ should insert NULL when post.title is null
✔ should update nothing when post.title is undefined
✔ should update to null when post.title is null
persistence > one-to-many
✓ supports 2 levels of required many-to-many associations with through.where clause (2857ms)
✔ should add exist element to exist object with empty one-to-many relation and save it
✔ should add exist element to new object with empty one-to-many relation and save it
✔ should remove exist element from one-to-many relation and save it
✓ supports 3 levels of required many-to-many associations with where clause (2043ms)
✔ should remove all elements from one-to-many relation and save it
✔ set relation to null (elements exist there) from one-to-many relation and save it (40ms)
persistence > one-to-one
set the relation with proper item
✔ should have an access token
doesn't allow the same relation to be used twice
✓ supports required many-to-many association (1327ms)
✔ should reject the saving attempt (87ms)
persistence > orphanage > delete
when a Post is removed from a Category
✔ should retain a Post on the Category
✔ should delete the orphaned Post from the database
✓ supports 2 required many-to-many association (1490ms)
✔ should retain foreign keys on remaining Posts
persistence > orphanage > disable
when a User is updated without all settings being loaded...
✔ should not delete setting with orphanedRowAction=disabed
✓ supports required one-to-many association (1422ms)
✔ should not orphane any Settings
persistence > partial persist
✔ should persist partial entities without data loss (61ms)
persistence > persistence options > chunks
✔ should save objects in chunks
persistence > persistence options > listeners
✔ save listeners should work by default
✔ save listeners should be disabled if save option is specified
✔ remove listeners should work by default
✔ remove listeners should be disabled if remove option is specified
✔ soft-remove listeners should work by default
✓ supports required one-to-many association with where clause (1468ms)
✔ soft-remove listeners should be disabled if remove option is specified
persistence > persistence options > transaction
✔ should disable transaction when option is specified
✔ should disable transaction when the drivers transactionSupport setting equals `none`
persistence > order of persistence execution operations
should throw exception when non-resolvable circular relations found
✔ should throw CircularRelationsError
should persist all entities in correct order
-
persistence > remove-topological-order
✔ should remove depend properties in a proper order
query builder > brackets
✔ should put parentheses in the SQL
✔ should put brackets correctly into WHERE expression
query builder > cache
✔ should cache results properly (1045ms)
✓ supports required one-to-many association with where clause (findOne) (1251ms)
✔ should cache results with pagination enabled properly (1043ms)
✓ supports 2 levels of required one-to-many associations (1350ms)
✔ should cache results with custom id and duration supplied (2032ms)
✔ should cache results with custom id and duration supplied (1035ms)
query builder > comment
✔ should scrub end comment pattern from string
✔ should not allow an empty comment
✔ should allow a comment with just whitespaces
✔ should allow a multi-line comment
✔ should include comment in select
✔ should include comment in update
✔ should include comment in insert
✔ should include comment in delete
query builder > composite primary
✔ should find entity by another entity with a composite key
query builder > count
✓ supports required one-to-many association with nested required many-to-many association (1277ms)
✔ Count query should of empty table should be 0
✔ Count query should count database values
✔ Count query should handle ambiguous values
✔ counting joined query should count database values
✔ counting joined queries should handle ambiguous values (49ms)
query builder > cte > materialized
✔ should allow MATERIALIZED hint
✔ should allow NOT MATERIALIZED hint
✔ should omit hint if materialized option is not set
query builder > cte > recursive
✔ should work with simple recursive query
query builder > cte > simple
✓ supports required many-to-many association with nested required one-to-many association (1336ms)
✔ show allow select from CTE
✔ should allow join with CTE
✔ should allow to use INSERT with RETURNING clause in CTE
✔ should allow string for CTE
query builder > delete
✔ should perform deletion correctly
✔ should be able to delete entities by embed criteria (41ms)
✔ should return correct delete result
✔ should throw error when unknown property in where criteria
query builder > distinct on
✔ should perform distinct on category authors
✔ should perform distinct on post authors and moderators combination
✔ should perform distinct on post and category authors
query builder > enabling transaction
✔ should execute query in a transaction
query builder > entity updation
✔ should update entity model after insertion if updateEntity is set to true
✔ should not update entity model after insertion if updateEntity is set to false
✔ should not override already set properties
✔ should update entity model after save
✔ should update special entity properties after entity updation if updateEntity is set to true
✓ supports required many-to-one association with nested many-to-many association with where clause (1376ms)
✔ should not update special entity properties after entity updation if updateEntity is set to false
query builder > exist
✔ Exists query of empty table should be false
✔ Exists query of non empty table should be true
query builder > insert
✔ should perform insertion correctly
✔ should perform bulk insertion correctly
✔ should be able to use sql functions
✔ should be able to insert entities with different properties set even inside embeds
query builder > insertion > on conflict
✔ should perform insertion correctly using onConflict
✔ should support alias in insert
✔ should perform insertion correctly using orIgnore
✔ should perform insertion correctly using orUpdate
✔ should perform insertion on partial index using orUpdate
✔ should perform insertion using partial index and skipping update on no change
✔ should throw error if using indexPredicate amd an unsupported driver
query builder > joins
leftJoinAndSelect
✓ supports required many-to-one association with nested many-to-many association with through.where clause (1432ms)
✔ should load data for all relation types (63ms)
✓ supports required many-to-one association with multiple nested associations with where clause (1847ms)
✔ should load data when additional condition used
✔ should load data when join tables does not have direct relation
innerJoinAndSelect
✓ supports required many-to-one association with nested one-to-many association with where clause (1501ms)
[MYSQL] Paranoid
✔ should load only exist data for all relation types (39ms)
✓ paranoid with timestamps: false should be ignored / not crash (2119ms)
✓ test if non required is marked as false
✔ should load data when additional condition used (41ms)
✓ test if required is marked as true
✔ should not return any result when related data does not exist
leftJoinAndMap
✓ should not load paranoid, destroyed instances, with a non-paranoid parent (1392ms)
[MYSQL] Includes with schemas
findAll
✔ should load and map selected data when entity used as join argument (47ms)
✓ should support an include with multiple different association types (1063ms)
✔ should load and map selected data when table name used as join argument (56ms)
✓ should support many levels of belongsTo (1337ms)
✓ should support ordering with only belongsTo includes (272ms)
✓ should include attributes from through models (338ms)
✔ should load and map selected data when query builder used as join argument
✓ should support a required belongsTo include (269ms)
✓ should be possible to extend the on clause with a where option on a belongsTo include (190ms)
✓ should be possible to extend the on clause with a where option on a belongsTo include (365ms)
✓ should be possible to define a belongsTo include as required with child hasMany with limit (333ms)
✓ should be possible to define a belongsTo include as required with child hasMany with limit and aliases (370ms)
✓ should be possible to define a belongsTo include as required with child hasMany which is not required with limit (473ms)
✔ should load and map selected data when data will given from same entity but with different conditions
✓ should be possible to extend the on clause with a where option on a hasOne include (219ms)
✓ should be possible to extend the on clause with a where option on a hasMany include with a through model (373ms)
✓ should be possible to extend the on clause with a where option on nested includes (819ms)
✔ should load and map selected data when data will given from same property but with different conditions (209ms)
innerJoinAndMap
✓ should be possible to use limit and a where with a belongsTo include (198ms)
✓ should be possible use limit, attributes and a where on a belongsTo with additional hasMany includes (983ms)
✔ should load and map selected data when entity used as join argument
✓ should be possible to use limit and a where on a hasMany with additional includes (1003ms)
✔ should load and map selected data when table name used as join argument
✓ should be possible to use limit and a where on a hasMany with a through model with additional includes (1114ms)
✓ should support including date fields, with the correct timezone (248ms)
findOne
✔ should load and map selected data when query builder used as join argument
✓ should work with schemas (344ms)
[MYSQL] Include
separate
✓ should run a hasMany association in a separate query (181ms)
✓ should work even if the id was not included (199ms)
✓ should work even if include does not specify foreign key attribute with custom sourceKey (198ms)
✓ should not break a nested include with null values (665ms)
✔ should load and map selected data when data will given from same entity but with different conditions
✓ should run a hasMany association with limit in a separate query (454ms)
✓ should run a nested (from a non-separate include) hasMany association in a separate query (291ms)
✓ should work having a separate include between a parent and child include (440ms)
✓ should run two nested hasMany association in a separate queries (312ms)
✓ should work with two schema models in a hasMany association (267ms)
✔ should load and map selected data when data will given from same property but with different conditions (55ms)
✓ should work with required non-separate parent and required child (342ms)
[MYSQL] Instance
Escaping
✓ is done properly for special characters
isNewRecord
✓ returns true for non-saved objects
✓ returns false for saved objects
✓ returns false for created objects
✓ returns false for upserted objects
✓ returns false for objects found by find method
✓ returns false for objects found by findAll method
default values
uuid
✓ should store a string in uuidv1 and uuidv4
✓ should store a string of length 36 in uuidv1 and uuidv4
✓ should store a valid uuid in uuidv1 and uuidv4 that conforms to the UUID v1 and v4 specifications
✓ should store a valid uuid if the multiple primary key fields used
current date
✓ should store a date in touchedAt
✓ should store the current date in touchedAt
allowNull date
✓ should be just "null" and not Date with Invalid Date
✓ should be the same valid date when saving the date
super user boolean
✔ should not return any result when related data does not exist
query builder > locking
✓ should default to false
✓ should override default when given truthy boolean
✓ should override default when given truthy boolean-string ("true")
✓ should override default when given truthy boolean-int (1)
✓ should throw error when given value of incorrect type
complete
✓ gets triggered if an error occurs
✓ gets triggered if everything was ok
findAll
✓ sql should have paranoid condition
✓ sequelize.and as where should include paranoid condition
✓ sequelize.or as where should include paranoid condition
✔ should not attach pessimistic read lock statement on query if locking is not used
✓ escapes a single single quotes properly in where clauses
✓ escapes two single quotes properly in where clauses
✓ returns the timestamps if no attributes have been specified
✓ does not return the timestamps if the username attribute has been specified
✓ creates the deletedAt property, when defining paranoid as true
✓ destroys a record with a primary key of something other than id (101ms)
✓ sets deletedAt property to a specific date when deleting an instance
✓ keeps the deletedAt-attribute with value null, when running update
✔ should throw error if pessimistic lock used without transaction
✓ keeps the deletedAt-attribute with value null, when updating associations
✓ can reuse query option objects
findOne
✓ can reuse query option objects
✓ returns null for null, undefined, and unset boolean values (88ms)
equals
✓ can compare records with Date field
✓ does not compare the existence of associations (220ms)
values
✓ returns all values (80ms)
isSoftDeleted
✓ should return false when model is just created
✓ returns false if user is not soft deleted
✓ returns true if user is soft deleted
✓ works with custom `deletedAt` field name (103ms)
1) should not throw error if pessimistic lock used with transaction
624 passing (8m)
26 pending
1 failing
1) query builder > locking
should not throw error if pessimistic lock used with transaction:
AssertionError: expected promise not to be rejected but it was rejected with 'QueryFailedError: ER_NOT_SUPPORTED_YE…'
typeorm-0.3.17 end
=========== ERROR EXIT [1]: FULL tidb.log BEGIN ============
[2024/05/17 09:50:03.362 +00:00] [INFO] [printer.go:47] ["Welcome to TiDB."] ["Release Version"=v8.2.0-alpha-187-g68db9c06fd] [Edition=Community] ["Git Commit Hash"=68db9c06fd3314dc647ccbab32596a6f3c70245a] ["Git Branch"=HEAD] ["UTC Build Time"="2024-05-17 09:43:47"] [GoVersion=go1.21.0] ["Race Enabled"=false] ["Check Table Before Drop"=false]
[2024/05/17 09:50:03.363 +00:00] [INFO] [printer.go:52] ["loaded config"] [config="{\"host\":\"0.0.0.0\",\"advertise-address\":\"10.233.87.47\",\"port\":4001,\"cors\":\"\",\"store\":\"tikv\",\"path\":\"127.0.0.1:2379\",\"socket\":\"\",\"lease\":\"0\",\"split-table\":false,\"token-limit\":1000,\"temp-dir\":\"/tmp/tidb\",\"tmp-storage-path\":\"/tmp/0_tidb/MC4wLjAuMDo0MDAxLzAuMC4wLjA6OTA4MQ==/tmp-storage\",\"tmp-storage-quota\":-1,\"server-version\":\"\",\"version-comment\":\"\",\"tidb-edition\":\"\",\"tidb-release-version\":\"\",\"keyspace-name\":\"\",\"log\":{\"level\":\"error\",\"format\":\"text\",\"disable-timestamp\":null,\"enable-timestamp\":null,\"disable-error-stack\":null,\"enable-error-stack\":null,\"file\":{\"filename\":\"\",\"max-size\":300,\"max-days\":0,\"max-backups\":0,\"compression\":\"\"},\"slow-query-file\":\"tidb-slow.log\",\"expensive-threshold\":10000,\"general-log-file\":\"\",\"query-log-max-len\":4096,\"enable-slow-log\":true,\"slow-threshold\":300,\"record-plan-in-slow-log\":1,\"timeout\":0},\"instance\":{\"tidb_general_log\":false,\"tidb_pprof_sql_cpu\":false,\"ddl_slow_threshold\":300,\"tidb_expensive_query_time_threshold\":60,\"tidb_expensive_txn_time_threshold\":600,\"tidb_stmt_summary_enable_persistent\":false,\"tidb_stmt_summary_filename\":\"tidb-statements.log\",\"tidb_stmt_summary_file_max_days\":3,\"tidb_stmt_summary_file_max_size\":64,\"tidb_stmt_summary_file_max_backups\":0,\"tidb_enable_slow_log\":true,\"tidb_slow_log_threshold\":300,\"tidb_record_plan_in_slow_log\":1,\"tidb_check_mb4_value_in_utf8\":true,\"tidb_force_priority\":\"NO_PRIORITY\",\"tidb_memory_usage_alarm_ratio\":0.8,\"tidb_enable_collect_execution_info\":true,\"plugin_dir\":\"/data/deploy/plugin\",\"plugin_load\":\"\",\"max_connections\":0,\"tidb_enable_ddl\":true,\"tidb_rc_read_check_ts\":false,\"tidb_service_scope\":\"\"},\"security\":{\"skip-grant-table\":false,\"ssl-ca\":\"\",\"ssl-cert\":\"\",\"ssl-key\":\"\",\"cluster-ssl-ca\":\"\",\"cluster-ssl-cert\":\"\",\"cluster-ssl-key\":\"\",\"cluster-verify-cn\":null,\"session-token-signing-cert\":\"\",\"session-token-signing-key\":\"\",\"spilled-file-encryption-method\":\"plaintext\",\"enable-sem\":false,\"auto-tls\":false,\"tls-version\":\"\",\"rsa-key-size\":4096,\"secure-bootstrap\":false,\"auth-token-jwks\":\"\",\"auth-token-refresh-interval\":\"1h0m0s\",\"disconnect-on-expired-password\":true},\"status\":{\"status-host\":\"0.0.0.0\",\"metrics-addr\":\"\",\"status-port\":9081,\"metrics-interval\":15,\"report-status\":true,\"record-db-qps\":false,\"record-db-label\":false,\"grpc-keepalive-time\":10,\"grpc-keepalive-timeout\":3,\"grpc-concurrent-streams\":1024,\"grpc-initial-window-size\":2097152,\"grpc-max-send-msg-size\":2147483647},\"performance\":{\"max-procs\":0,\"max-memory\":0,\"server-memory-quota\":0,\"stats-lease\":\"0\",\"stmt-count-limit\":5000,\"pseudo-estimate-ratio\":0.8,\"bind-info-lease\":\"3s\",\"txn-entry-size-limit\":6291456,\"txn-total-size-limit\":104857600,\"tcp-keep-alive\":true,\"tcp-no-delay\":true,\"cross-join\":true,\"distinct-agg-push-down\":false,\"projection-push-down\":false,\"max-txn-ttl\":3600000,\"index-usage-sync-lease\":\"\",\"plan-replayer-gc-lease\":\"10m\",\"gogc\":100,\"enforce-mpp\":false,\"stats-load-concurrency\":0,\"stats-load-queue-size\":1000,\"analyze-partition-concurrency-quota\":16,\"plan-replayer-dump-worker-concurrency\":1,\"enable-stats-cache-mem-quota\":true,\"committer-concurrency\":128,\"run-auto-analyze\":true,\"force-priority\":\"NO_PRIORITY\",\"memory-usage-alarm-ratio\":0.8,\"enable-load-fmsketch\":false,\"lite-init-stats\":true,\"force-init-stats\":true,\"concurrently-init-stats\":true},\"prepared-plan-cache\":{\"enabled\":true,\"capacity\":100,\"memory-guard-ratio\":0.1},\"opentracing\":{\"enable\":false,\"rpc-metrics\":false,\"sampler\":{\"type\":\"const\",\"param\":1,\"sampling-server-url\":\"\",\"max-operations\":0,\"sampling-refresh-interval\":0},\"reporter\":{\"queue-size\":0,\"buffer-flush-interval\":0,\"log-spans\":false,\"local-agent-host-port\":\"\"}},\"proxy-protocol\":{\"networks\":\"\",\"header-timeout\":5,\"fallbackable\":false},\"pd-client\":{\"pd-server-timeout\":3},\"tikv-client\":{\"grpc-connection-count\":4,\"grpc-keepalive-time\":10,\"grpc-keepalive-timeout\":3,\"grpc-compression-type\":\"none\",\"grpc-shared-buffer-pool\":false,\"grpc-initial-window-size\":134217728,\"grpc-initial-conn-window-size\":134217728,\"commit-timeout\":\"41s\",\"async-commit\":{\"keys-limit\":256,\"total-key-size-limit\":4096,\"safe-window\":2000000000,\"allowed-clock-drift\":500000000},\"max-batch-size\":128,\"overload-threshold\":200,\"max-batch-wait-time\":0,\"batch-wait-size\":8,\"enable-chunk-rpc\":true,\"region-cache-ttl\":600,\"store-limit\":0,\"store-liveness-timeout\":\"1s\",\"copr-cache\":{\"capacity-mb\":1000},\"copr-req-timeout\":60000000000,\"ttl-refreshed-txn-size\":33554432,\"resolve-lock-lite-threshold\":16,\"max-concurrency-request-limit\":9223372036854775807,\"enable-replica-selector-v2\":true},\"binlog\":{\"enable\":false,\"ignore-error\":false,\"write-timeout\":\"15s\",\"binlog-socket\":\"\",\"strategy\":\"range\"},\"compatible-kill-query\":false,\"pessimistic-txn\":{\"max-retry-count\":256,\"deadlock-history-capacity\":10,\"deadlock-history-collect-retryable\":false,\"pessimistic-auto-commit\":false,\"constraint-check-in-place-pessimistic\":true},\"max-index-length\":3072,\"index-limit\":64,\"table-column-count-limit\":1017,\"graceful-wait-before-shutdown\":0,\"alter-primary-key\":false,\"treat-old-version-utf8-as-utf8mb4\":true,\"enable-table-lock\":false,\"delay-clean-table-lock\":0,\"split-region-max-num\":1000,\"top-sql\":{\"receiver-address\":\"\"},\"repair-mode\":false,\"repair-table-list\":[],\"isolation-read\":{\"engines\":[\"tikv\",\"tiflash\",\"tidb\"]},\"new_collations_enabled_on_first_bootstrap\":true,\"experimental\":{\"allow-expression-index\":false},\"skip-register-to-dashboard\":false,\"enable-telemetry\":false,\"labels\":{},\"enable-global-index\":false,\"deprecate-integer-display-length\":false,\"enable-enum-length-limit\":true,\"stores-refresh-interval\":60,\"enable-tcp4-only\":false,\"enable-forwarding\":false,\"max-ballast-object-size\":0,\"ballast-object-size\":0,\"transaction-summary\":{\"transaction-summary-capacity\":500,\"transaction-id-digest-min-duration\":2147483647},\"enable-global-kill\":true,\"enable-32bits-connection-id\":true,\"initialize-sql-file\":\"\",\"enable-batch-dml\":false,\"mem-quota-query\":1073741824,\"oom-action\":\"cancel\",\"oom-use-tmp-storage\":true,\"check-mb4-value-in-utf8\":true,\"enable-collect-execution-info\":true,\"plugin\":{\"dir\":\"/data/deploy/plugin\",\"load\":\"\"},\"max-server-connections\":0,\"run-ddl\":true,\"disaggregated-tiflash\":false,\"autoscaler-type\":\"aws\",\"autoscaler-addr\":\"tiflash-autoscale-lb.tiflash-autoscale.svc.cluster.local:8081\",\"is-tiflashcompute-fixed-pool\":false,\"autoscaler-cluster-id\":\"\",\"use-autoscaler\":false,\"tidb-max-reuse-chunk\":64,\"tidb-max-reuse-column\":256,\"tidb-enable-exit-check\":false,\"in-mem-slow-query-topn-num\":30,\"in-mem-slow-query-recent-num\":500}"]
[2024/05/17 09:50:03.363 +00:00] [INFO] [cgmon.go:130] ["set the maxprocs"] [quota=6]
[2024/05/17 09:50:21.411 +00:00] [ERROR] [advancer.go:400] ["listen task meet error, would reopen."] [error=EOF]
[2024/05/17 09:50:21.543 +00:00] [ERROR] [tso_client.go:365] ["[tso] update connection contexts failed"] [dc=global] [error="rpc error: code = Canceled desc = context canceled"]
=========== ERROR EXIT [1]: FULL tidb.log END ==============
[Pipeline] }
Cache not saved (inner-step execution failed)
[Pipeline] // cache
[Pipeline] }
[Pipeline] // dir
Post stage
[Pipeline] script
[Pipeline] {
[Pipeline] echo
Test failed, archive the log
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // container
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
restore
✓ returns an error if the model is not paranoid
✓ restores a previously deleted model (101ms)
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
Failed in branch Matrix - TEST_DIR = 'typeorm_test'
Sending interrupt signal to process
Killing processes
✓ supports custom deletedAt field (90ms)
kill finished with exit code 0
✓ supports custom deletedAt field name (104ms)
Terminated
script returned exit code 143
[Pipeline] }
Cache not saved (inner-step execution failed)
[Pipeline] // cache
[Pipeline] }
[Pipeline] // dir
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // container
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
Failed in branch Matrix - TEST_DIR = 'sequelize_test'
[Pipeline] // parallel
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // timeout
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // container
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE