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

Discussion: LowDB and concurrency #26

Closed
kevinold opened this issue Jan 17, 2020 · 2 comments
Closed

Discussion: LowDB and concurrency #26

kevinold opened this issue Jan 17, 2020 · 2 comments
Labels
backend question Further information is requested

Comments

@kevinold
Copy link
Contributor

We selected lowdb because of it's easy to install footprint and base of json-server.

The configuration for running Jest tests has been adjusted to run them synchronously (via --runInBand) due to failures when the unit test are run concurrently.

To date, the Cypress API tests have not had an issue.

Our primary goals for a database are:

  1. Ensure that we are able to execute real world test case scenarios with zero installation dependencies
  2. Retrieve record immediately after save

Given this information, we may need to look to one of the following solutions (or others) to ensure tests can be run asynchronously.

  1. Use async/await with the existing lowdb Sync Adapter
  2. Investigate/use lowdb's Async Adapter (https://github.com/typicode/lowdb/blob/master/src/adapters/FileAsync.js)
  3. Investigate how json-server handles the situation
@kevinold kevinold added question Further information is requested backend labels Jan 17, 2020
@amirrustam
Copy link
Contributor

@kevinold
Copy link
Contributor Author

Based on discussions we will revisit if it becomes an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants