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

chore: update sporadically failing tests, upgrade tigerbeetle #1541

Merged
merged 4 commits into from
Jul 4, 2023

Conversation

mkurapov
Copy link
Contributor

@mkurapov mkurapov commented Jul 4, 2023

Changes proposed in this pull request

  • Update grant pagination tests
  • (hopefully) fix BigInt serialization issue during test running
  • upgrade tigerbeetle to 0.13.38

Context

Sometimes, we would see this test failure in the CI step, example:

FAIL auth src/grant/service.test.ts
   Grant Service  getGrantsPage  Can paginate and filter

    TypeError: Cannot read properties of undefined (reading 'id')

      324 |       )
      325 |
    > 326 |       expect(page[0].id).toBe(grants?.[1].id)
          |                      ^
      327 |       expect(page.length).toBe(1)
      328 |     })
      329 |   })

      at Object.id (packages/auth/src/grant/service.test.ts:326:[22](https://github.com/interledger/rafiki/actions/runs/5455836801/jobs/9927874921#step:5:23))

This is because of the Promise.all: the order for the in-memory grants array was different than what was created in the database.

This also adds a workerThreads: true option to the base jest config, to hopefully resolve the sporadic BigInt serialisation issue:

Checklist

  • Related issues linked using fixes #number
  • Tests added/updated
  • Documentation added
  • Make sure that all checks pass

@netlify
Copy link

netlify bot commented Jul 4, 2023

Deploy Preview for brilliant-pasca-3e80ec canceled.

Name Link
🔨 Latest commit 1e5fb05
🔍 Latest deploy log https://app.netlify.com/sites/brilliant-pasca-3e80ec/deploys/64a46939a41c3200083f0ae2

@github-actions github-actions bot added type: tests Testing related type: source Changes business logic pkg: auth Changes in the GNAP auth package. labels Jul 4, 2023
@@ -6,5 +6,6 @@ module.exports = {
},
testEnvironment: 'node',
moduleDirectories: ['node_modules', './'],
modulePaths: ['node_modules', './']
modulePaths: ['node_modules', './'],
workerThreads: true
Copy link
Contributor Author

@mkurapov mkurapov Jul 4, 2023

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@mkurapov mkurapov marked this pull request as ready for review July 4, 2023 17:41
@github-actions github-actions bot added the pkg: backend Changes in the backend package. label Jul 4, 2023
@mkurapov
Copy link
Contributor Author

mkurapov commented Jul 4, 2023

Tigerbeetle tests are failing now, trying to fix... ✅

@mkurapov mkurapov changed the title test(auth): update sporadically failing tests chore: update sporadically failing tests, upgrade tigerbeetle Jul 4, 2023
@mkurapov mkurapov merged commit 3e898f0 into main Jul 4, 2023
23 checks passed
@mkurapov mkurapov deleted the mk/fix-tests branch July 4, 2023 20:26
Muasa-harman pushed a commit to Muasa-harman/rafiki that referenced this pull request Jul 13, 2023
…edger#1541)

* test(auth): update sporadically failing tests

* test: update base jest config to use workerThreads

* test: update tigerbeetle

* chore: update tigerbeetle in docker compose & helm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: auth Changes in the GNAP auth package. pkg: backend Changes in the backend package. type: source Changes business logic type: tests Testing related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jest expect failure error with BigInt
3 participants