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

move test reinit to mocha's after hooks #558

Merged
merged 3 commits into from
Aug 3, 2022

Conversation

alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Aug 3, 2022

Closes #499

This will fail the whole suite fast if initialize() times out in a single test. IMO this is helpful, as otherwise the state of the database is unpredictable for subsequent tests.

Example failure:

  1 failing

  1) "before each" hook for "should reject forms created while project managed encryption is being enabled @slow":
     Error: Failed to reinitalize after previous test: 'managed encryption lock management should reject keyless forms in keyed projects @slow'.  You may need to increase your mocha timeout.
      at Context.<anonymous> (test/integration/setup.js:80:29)
      at processImmediate (internal/timers.js:464:21)

@alxndrsn alxndrsn marked this pull request as ready for review August 3, 2022 05:57
@alxndrsn alxndrsn changed the title Test reinit flag move test reinit to mocha's after hooks Aug 3, 2022
@matthew-white matthew-white merged commit f391b6c into getodk:master Aug 3, 2022
@alxndrsn alxndrsn deleted the test-reinit-flag branch August 4, 2022 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants