[testDBClientAction] Unify duplicated code