Skip to content
  • Hjem
  • Seneste
  • Etiketter
  • Populære
  • Verden
  • Bruger
  • Grupper
Temaer
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Kollaps
FARVEL BIG TECH
  1. Forside
  2. Ikke-kategoriseret
  3. Help testing, improving and suggesting improvements for MySQL driver support branch

Help testing, improving and suggesting improvements for MySQL driver support branch

Planlagt Fastgjort Låst Flyttet Ikke-kategoriseret
1 Indlæg 1 Posters 0 Visninger
  • Ældste til nyeste
  • Nyeste til ældste
  • Most Votes
Svar
  • Svar som emne
Login for at svare
Denne tråd er blevet slettet. Kun brugere med emne behandlings privilegier kan se den.
  • M This user is from outside of this forum
    M This user is from outside of this forum
    mbanucu@community.nodebb.org
    wrote sidst redigeret af
    #1

    I have a pull request:
    https://github.com/NodeBB/NodeBB/pull/13413

    Everything seems to work for me with my MySQL setup.
    12364dbf-4a0b-4d0f-93bb-9e470bd16b54-image.png
    All 4947 tests are passing.

    That is more than the current test setup.
    b3f272ca-1805-418e-9fa0-522dbd4bf8d1-image.png
    I fixed some wrong test discovery phase workarounds so there are more tests running now.
    I solved it with top-level await to init the database in top-level instead of in before, because some describes depend on a running database in the test discovery phase. The workaround with putting a describe in an it doesn’t work.

    I translated many CommonJS test files with ESM files because the require('mocks/databasemock.mjs') doesn’t work, because it contains now the top-level await. Requiring mjs files from cjs files is only allowed if the mjs doesn’t contain any top-level await. Requiring mjs files is only possible without workarounds since Node.js version 20.19 (https://github.com/nodejs/node/pull/56927). So I changed the recommended Node.js version in package.json to >= 20.19.0. I then found a workaround to abuse the test loading of mocha to load mocks/databasemock.mjs as a test before any other test and then it works because mocha can load cjs and mjs tests and the mjs tests are allowed to have top-level await and they are dynamically imported correctly from mocha.

    Right now only MySQL 8.0 works. MariaDB doesn’t work. At least I got an error when trying to use MariaDB and I didn’t spend time fixing it.

    Please help with suggestions for improvement, manual tests, …!

    1 Reply Last reply
    1
    0
    • support@community.nodebb.orgS support@community.nodebb.org shared this topic
    Svar
    • Svar som emne
    Login for at svare
    • Ældste til nyeste
    • Nyeste til ældste
    • Most Votes


    • Log ind

    • Har du ikke en konto? Tilmeld

    • Login or register to search.
    Powered by NodeBB Contributors
    Graciously hosted by data.coop
    • First post
      Last post
    0
    • Hjem
    • Seneste
    • Etiketter
    • Populære
    • Verden
    • Bruger
    • Grupper