Resolver test cases

 I was working to fix failed builds and then I come to know that test cases had been failed because of fbb79b5. So I sent a PR #13439 in which I come to know that my PR has just reverted the code which was added in the above commit(fbb79b5) so added test cases for the same commit.

1. Added new test cases for `Resolver#connection_url_to_hash`
2. Modified the condition to find `database` name(this might be cosmetic change, can revert if required).