add task database setting code in unit test