refactor: add DbWrapper class to change db interaction
db: add DbWrapper class instead of using global variables; init db connection each create app tests: remove single loop; add tests multithread run ability
db: add DbWrapper class instead of using global variables; init db connection each create app tests: remove single loop; add tests multithread run ability