refactoring persistence test for docker