kvrocks
kvrocks copied to clipboard
Unit tests don't remove test directory
Search before asking
- [X] I had searched in the issues and found no similar issues.
Version
Kvrocks version: the latest unstable e4ae784a271b4d815eb3a015e27c6f6e296b3036 OS: Fedora 35
Minimal reproduce step
Build and run unit tests by executing ./unittest
What did you expect to see?
Deletion of the testdb folder at the end of unit tests.
What did you see instead?
Directory testdb exists, because rmdir function (https://github.com/apache/incubator-kvrocks/blob/unstable/tests/cppunit/test_base.h#L41) is unable to remove a non-empty directory.
Anything Else?
Directory compactdb also exists after unit tests have finished.
If there were a function to traverse the content of a directory removing files and folders recursively, it would be applied to compactdb as well.
Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
We didn't have the recursive delete directory yet.