Skip to content

Commit b6341a2

Browse files
committed
Revert intentionally malformed server name, expand handled errors
1 parent d07dd75 commit b6341a2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/IntelliTect.AspNetCore.SignalR.SqlServer.Tests/SqlServerEndToEndTests.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class SqlServerEndToEndTests
1616
{
1717
private const string databaseName = "SignalRUnitTestsDb";
1818
private const string connectionString =
19-
"Server=lsocalhost;Database=" + databaseName + ";Trusted_Connection=True;";
19+
"Server=localhost;Database=" + databaseName + ";Trusted_Connection=True;";
2020

2121
[SkippableFact]
2222
public async Task CanSendAndReceivePayloads_WithServiceBroker()
@@ -93,7 +93,11 @@ private static async Task CreateDatabaseAsync()
9393
BEGIN CREATE DATABASE {databaseName}; END";
9494
await command.ExecuteNonQueryAsync();
9595
}
96-
catch (SqlException ex) when (ex.Number == 53 || ex.Message.Contains("Could not open a connection to SQL Server"))
96+
catch (SqlException ex) when (
97+
ex.Number == 53
98+
|| ex.Message.Contains("Could not open a connection to SQL Server")
99+
|| ex.Message.Contains("The server was not found or was not accessible")
100+
)
97101
{
98102
Skip.If(true, "SQL Server not available on localhost");
99103
}

0 commit comments

Comments
 (0)