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

DB cleanup recepie #84

Open
goldbergyoni opened this issue Apr 4, 2021 · 0 comments
Open

DB cleanup recepie #84

goldbergyoni opened this issue Apr 4, 2021 · 0 comments
Assignees

Comments

@goldbergyoni
Copy link
Contributor

goldbergyoni commented Apr 4, 2021

The setup

  • Dedicated folder or even repo
  • Super simple example app in one file - Add & delete order. One column should be unique
  • Single test: Delete order, ensure it was deleted. X100 times (run in a loop to test.each)
  • 20 tables with relationship

The options

  • Option1: Delete all tables on beforeEach
  • Option2: Delete on global teardown occasionally (once a day or with random)
  • Option3: Transactions

Checks and conclusions

  • The performance of each option under 100 tests
  • When cleaning, what is faster: Delete or Truncate
  • The performance of a single process (--run-in-band) vs max-1 processes
  • The RAM impact of having 6 Postgres vs only 1
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

No branches or pull requests

2 participants