Skip to content

Do not use a shared database for SQLite tests #232

@tburny

Description

@tburny

It seems that src/packages/emmett-sqlite/src/eventStore/consumers/sqliteEventStoreConsumer.handling.int.spec.ts is using a database called test for the test.

However its path is in the same location as its test and the filename is fixed. This causes two issues:

  • Test isolation: Running the tests in parallel for the same checkout directory of Emmett could cause a race condition. For instance a test could try cleaning up the database while tests are still running in the other process.
  • Missing .gitignore: The database is not ignored in git, which makes it prone to accidentally committing it

Also as of 65d846e the tests do not pass on my machine.

Suggestion for fixing

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions