Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v7
- name: Install .NET SDK
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
9.0.x
include-prerelease: true
10.0.x
11.0.x
- name: Build
run: dotnet build --configuration Release
- name: Test
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install .NET SDK
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
8.0.x
9.0.x
include-prerelease: true
10.0.x
11.0.x
- name: Set VERSION
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Build
Expand All @@ -39,7 +39,7 @@ jobs:
run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ steps.login.outputs.NUGET_API_KEY }}

- name: Create GH Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v3
with:
files: |
*.nupkg
Expand Down
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project>
<PropertyGroup>
<LangVersion>12.0</LangVersion>
<Company>IntelliTect</Company>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
114 changes: 0 additions & 114 deletions IntelliTect.AspNetCore.SignalR.SqlServer.sln

This file was deleted.

19 changes: 19 additions & 0 deletions IntelliTect.AspNetCore.SignalR.SqlServer.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Solution>
<Folder Name="/demo/">
<Project Path="demo/DemoBlazorServer/DemoBlazorServer.csproj" />
<Project Path="demo/DemoServer.AppHost/DemoServer.AppHost.csproj" />
<Project Path="demo/DemoServer/DemoServer.csproj" />
</Folder>
<Folder Name="/Solution Items/">
<File Path=".github/workflows/ci.yml" />
<File Path=".github/workflows/release.yml" />
<File Path="Directory.Build.props" />
<File Path="README.md" />
</Folder>
<Folder Name="/src/">
<Project Path="src/IntelliTect.AspNetCore.SignalR.SqlServer/IntelliTect.AspNetCore.SignalR.SqlServer.csproj" />
</Folder>
<Folder Name="/test/">
<Project Path="test/IntelliTect.AspNetCore.SignalR.SqlServer.Tests/IntelliTect.AspNetCore.SignalR.SqlServer.Tests.csproj" />
</Folder>
</Solution>
4 changes: 2 additions & 2 deletions demo/DemoBlazorServer/DemoBlazorServer.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="10.0.15" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion demo/DemoServer.AppHost/AppHost.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var builder = DistributedApplication.CreateBuilder(args);

builder.AddProject<Projects.DemoServer>("demoserver")
builder.AddDotnetProject("demoserver", "../DemoServer/DemoServer.csproj")
.WithExternalHttpEndpoints();

builder.Build().Run();
11 changes: 3 additions & 8 deletions demo/DemoServer.AppHost/DemoServer.AppHost.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.5.0" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>9587d5d1-fe59-4d28-9159-32313b3a4f87</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.5.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DemoServer\DemoServer.csproj" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="17.0.0" />
<PackageReference Include="Aspire.Hosting.Dotnet" Version="17.0.0" />
</ItemGroup>

</Project>
12 changes: 6 additions & 6 deletions demo/DemoServer/DemoServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<PropertyGroup>
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
<IsPackable>false</IsPackable>
<TargetFrameworks>net9.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="10.0.15" />

<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.15.3" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.12.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.12.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.12.0-beta.3" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.21.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.21.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.21.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.21.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net8.0;net10.0;net11.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>

Expand All @@ -13,9 +13,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

<PackageReference Include="MessagePack" Version="3.1.7" />
<PackageReference Include="MessagePack" Version="3.1.12" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net10.0;net11.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="8.0.28" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="8.0.34" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.12.0" />
<PackageReference Include="xunit.v3.mtp-off" Version="4.0.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="4.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector" Version="10.1.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ namespace IntelliTect.AspNetCore.SignalR.SqlServer.Tests
{
public class SqlServerEndToEndTests
{
private const string databaseName = "SignalRUnitTestsDb";
private const string connectionString =
// Per-runtime database: each target framework's test run executes in parallel.
private static readonly string databaseName = "SignalRUnitTestsDb_net" + Environment.Version.Major;
private static readonly string connectionString =
"Server=localhost;Database=" + databaseName + ";Trusted_Connection=True;Timeout=5;TrustServerCertificate=True";

[SkippableFact]
[Fact]
public async Task CanSendAndReceivePayloads_WithServiceBroker()
{
await CreateDatabaseAsync();
Expand All @@ -34,7 +35,7 @@ public async Task CanSendAndReceivePayloads_WithServiceBroker()
await RunCore(options, prefix);
}

[SkippableFact]
[Fact]
public async Task CanSendAndReceivePayloads_WithPolling()
{
await CreateDatabaseAsync();
Expand All @@ -50,7 +51,7 @@ public async Task CanSendAndReceivePayloads_WithPolling()
}


[SkippableFact]
[Fact]
public async Task CanSendAndReceivePayloads_WithServiceBroker_UnderHeavyLoad()
{
await CreateDatabaseAsync();
Expand All @@ -74,7 +75,7 @@ public async Task CanSendAndReceivePayloads_WithServiceBroker_UnderHeavyLoad()
return Task.CompletedTask;
});
// Give the receiver time to reach a steady state (waiting).
await Task.Delay(150);
await Task.Delay(150, TestContext.Current.CancellationToken);

var cts = new CancellationTokenSource();

Expand All @@ -101,11 +102,11 @@ public async Task CanSendAndReceivePayloads_WithServiceBroker_UnderHeavyLoad()

var payload = new byte[255];
new Random().NextBytes(payload);
await Task.Delay(10000);
await Task.Delay(10000, TestContext.Current.CancellationToken);
cts.Cancel();

// Give the receiver time to reach a steady state (waiting).
await Task.Delay(1000);
await Task.Delay(1000, TestContext.Current.CancellationToken);

Assert.Equal(numSent, receivedMessages.Count);

Expand All @@ -129,7 +130,7 @@ private async Task RunCore(SqlServerOptions options, string prefix)
return Task.CompletedTask;
});
// Give the receiver time to reach a steady state (waiting).
await Task.Delay(150);
await Task.Delay(150, TestContext.Current.CancellationToken);

var payload = new byte[255];
new Random().NextBytes(payload);
Expand All @@ -140,7 +141,7 @@ private async Task RunCore(SqlServerOptions options, string prefix)
Assert.Equal(payload, message);

// Give the receiver time to reach a steady state (waiting).
await Task.Delay(50);
await Task.Delay(50, TestContext.Current.CancellationToken);

receiver.Dispose();
await receiverTask;
Expand All @@ -163,7 +164,7 @@ private static async Task CreateDatabaseAsync()
|| ex.Message.Contains("The server was not found or was not accessible")
)
{
Skip.If(true, ex.Message);
Assert.Skip(ex.Message);
}
}
}
Expand Down