Creates and tests a database connection with retry functionality
DatabaseConnectionError if connection fails after all retries
The database userRole to use for connection
Maximum number of connection attempts
Delay between retry attempts in milliseconds
A Promise resolving to connection result object
Creates and tests a database connection with retry functionality
Throws
DatabaseConnectionError if connection fails after all retries