Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(ci): update ci config #415

Merged
merged 2 commits into from
Apr 1, 2022
Merged

test(ci): update ci config #415

merged 2 commits into from
Apr 1, 2022

Conversation

seaerchin
Copy link
Contributor

@seaerchin seaerchin commented Mar 31, 2022

Problem

Previously, our ci configuration was not working due to a few issues. These are respectively:

  1. requiring docker containers to be setup prior to running tests (for integration testing)
  2. source command not existing in github runner shell
  3. jest not automatically exiting

Solution

In order, the fixes are as follows:

  1. run npm run dev:services command
  2. change source to .
  3. This is more interesting and more detail will be provided - i think this issue covers it up pretty well and i adopted their solution. Basically all the tests pass but jest wasn't exiting and resulted in an indefinite wait. This problem is due to sequelize having a connection pool and the teardown script doesn't close all the connections, merely one connection. To fix this, there's another script that's ran after every test suite and this script closes sequelize connections. Oddly enough, setting DB_MAX_POOL = 1 in the env vars don't work for this

Copy link
Contributor

@alexanderleegs alexanderleegs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for investigating this!!

@seaerchin seaerchin merged commit b5b7ce9 into develop Apr 1, 2022
@seaerchin seaerchin deleted the test/fix-ci branch April 1, 2022 04:01
This was referenced Apr 14, 2022
harishv7 pushed a commit that referenced this pull request Feb 17, 2023
* ci(ci): update ci workflow

* fix(jest): add a script to close sequelize after every test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants