change ping db logic
fix broken test