Fixing issue for database lock  while unit test running