philippgille/gokv

Clean up stores after test

philippgille opened this issue · 0 comments

The DBs and data that's created during the tests is not cleaned up properly. Especially in the badgerdb package, when a store is created, it creates a 2 GB file on the filesystem. When running all tests this means that about 10 GB of space is filled up. But it's not only about these files, but also when using a client for one of the DB servers, the tests should have a "tear down" phase where created data is deleted, so the DBs can be used further, instead of having to create a new Docker container for example.

For BadgerDB, one of the requirements was the ability to Close() the store, so the file handle is released and the file can be removed. Close() was recently implemented (#36).