Yes I am sure database could be reached. Out of 3000 tests some are failing randomly with Sql timeouts.
Below is the method I am using to open the DB connection
private DbConnection GetDBConnection()
{
var db = _sqlDBfactory.CreateConnection();
db!.ConnectionString = _databaseConnectionString + "Initial Catalog=clients;";
db.Open();
return db;
}
Calling example:
using var db = GetDBConnection();
try
{
return db.QueryFirst<string>(
$"SELECT statment goes here... omitted purposly;
}
finally
{
db.Close();
}