#14161·sequelize

Tests are flaky again

Author: ephysCreated Feb 24, 2022Updated Sep 17, 2026
Labelshard to reproduce

This issue aims to document the various tests that fail randomly on the CI.

https://github.com/sequelize/sequelize/runs/5320675964?check_suite_focus=true

# mariadb 10.5 (node 16)
  1) [MARIADB] Pooling
       idle
         [MSSQL Flaky] should get new connection beyond idle range:

      AssertionError: expected 46 to not equal 46
      + expected - actual


      at Proxy.assertEqual (node_modules/chai/lib/chai/core/assertions.js:1038:12)
      at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
      at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
      at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
      at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
      at assertNewConnection (test/integration/pool.test.js:47:48)
      at Context.<anonymous> (test/integration/pool.test.js:213:7)
      at runMicrotasks (<anonymous>)
      at runNextTicks (node:internal/process/task_queues:61:5)
      at processTimers (node:internal/timers:499:9)

https://github.com/sequelize/sequelize/runs/5152023145?check_suite_focus=true

# sqlite (node 12)
 1) [SQLITE] Transaction
       fails with SQLITE_BUSY when retry.match is changed:
     AssertionError: expected promise to be rejected with an error including 'SQLITE_BUSY: database is locked' but it was fulfilled with [ undefined, undefined ]
      at assertIfNotNegated (node_modules/chai-as-promised/lib/chai-as-promised.js:68:19)
      at /home/runner/work/sequelize/sequelize/node_modules/chai-as-promised/lib/chai-as-promised.js:183:17
      at async Context.<anonymous> (test/integration/transaction.test.js:739:9)

https://github.com/sequelize/sequelize/runs/5156282992?check_suite_focus=true

# mariadb 10.5 (node 12)

 1) [MARIADB] Model
       scope
         complex merge
           should merge complex scopes with findAll options correctly regardless of their order:

      AssertionError: expected { id: 1, name: 'foo1', bars: [ …(2) ] } to deeply equal { id: 1, name: 'foo1', bars: [ …(2) ] }
      + expected - actual

           {
             "bazs": [
               {
                 "barId": 1
      -          "id": 2
      +          "id": 1
                 "quxes": [
                   {
      -              "bazId": 2
      -              "id": 1
      -              "name": "qux3"
      +              "bazId": 1
      +              "id": 3
      +              "name": "qux1"
                   }
                   {
      -              "bazId": 2
      -              "id": 2
      -              "name": "qux4"
      +              "bazId": 1
      +              "id": 4
      +              "name": "qux2"
                   }
                 ]
               }
               {
                 "barId": 1
      -          "id": 1
      +          "id": 2
                 "quxes": [
                   {
      -              "bazId": 1
      -              "id": 3
      -              "name": "qux1"
      +              "bazId": 2
      +              "id": 1
      +              "name": "qux3"
                   }
                   {
      -              "bazId": 1
      -              "id": 4
      -              "name": "qux2"
      +              "bazId": 2
      +              "id": 2
      +              "name": "qux4"
                   }
                 ]
               }
             ]
      
      at Proxy.assertEql (node_modules/chai/lib/chai/core/assertions.js:1096:10)
      at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
      at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
      at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
      at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
      at Proxy.assertEqual (node_modules/chai/lib/chai/core/assertions.js:1035:12)
      at Proxy.methodWrapper (node_modules/chai/lib/chai/utils/addMethod.js:57:25)
      at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:289:22)
      at Proxy.<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:255:20)
      at Proxy.overwritingMethodWrapper (node_modules/chai/lib/chai/utils/overwriteMethod.js:78:33)
      at Context.<anonymous> (test/integration/model/scope/merge.test.js:185:43)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)