goconvey icon indicating copy to clipboard operation
goconvey copied to clipboard

Disable concurrency

Open mouuff opened this issue 6 years ago • 2 comments

Hello, I would like to know if there is an option to disable concurrency in goconvey

mouuff avatar Nov 12 '19 12:11 mouuff

I m trying to test a database access object, different tests are running on the same database. Two different tests are not supposed to run at the same time (for example: I don't want one test to drop a table while another test is adding an user to this table.) Having one database per test works, but its not really what I would call "ideal"

mouuff avatar Nov 12 '19 13:11 mouuff

Your best options:

  • for simpler cases, use an in memory DB (like SQLite) that is so cheap to initialize and manipulate, it doesn't matter if you rebuild it for each test file
  • for complex cases, use a transactional database and rollback whatever changes at the end of each test block

atz avatar Jun 23 '21 17:06 atz