I want to run some cleanup code like stopping database service. I am currently using std::sync::Once::call_once
:
fn init() {
INIT.call_once(|| {
//start database
});
}
I put this function in each test. Now I want to run another function which will be executed when all tests are finished. How can I do that?