Skip to content

Commit 2b18a57

Browse files
Updates for .NET 10 - release-8.1 (#1647)
1 parent 857e31a commit 2b18a57

File tree

70 files changed

+250
-251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+250
-251
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,18 @@ jobs:
2929
SECRETS_AVAILABLE: ${{ secrets.SECRETS_AVAILABLE }}
3030
run: exit $(If ($env:SECRETS_AVAILABLE -eq 'true') { 0 } Else { 1 })
3131
- name: Checkout
32-
uses: actions/checkout@v4.2.2
32+
uses: actions/checkout@v6.0.1
3333
with:
3434
fetch-depth: 0
3535
- name: Setup .NET SDK
36-
uses: actions/setup-dotnet@v4.1.0
36+
uses: actions/setup-dotnet@v5.1.0
3737
with:
38-
dotnet-version: |
39-
9.0.x
40-
8.0.x
38+
global-json-file: global.json
4139
- name: Build
4240
run: dotnet build src --configuration Release
4341
- name: Upload packages
4442
if: matrix.name == 'Windows'
45-
uses: actions/upload-artifact@v4.4.3
43+
uses: actions/upload-artifact@v6.0.0
4644
with:
4745
name: NuGet packages
4846
path: nugets/
@@ -64,7 +62,7 @@ jobs:
6462
sqlcmd -Q "CREATE SCHEMA sender AUTHORIZATION db_owner" -d "nservicebus"
6563
sqlcmd -Q "CREATE SCHEMA db@ AUTHORIZATION db_owner" -d "nservicebus"
6664
- name: Azure login
67-
uses: azure/login@v2.1.1
65+
uses: azure/login@v2.3.0
6866
with:
6967
creds: ${{ secrets.AZURE_ACI_CREDENTIALS }}
7068
- name: Setup PostgreSql 15.x

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v4.2.2
17+
uses: actions/checkout@v6.0.1
1818
with:
1919
fetch-depth: 0
2020
- name: Setup .NET SDK
21-
uses: actions/setup-dotnet@v4.1.0
21+
uses: actions/setup-dotnet@v5.1.0
2222
with:
23-
dotnet-version: 9.0.x
23+
global-json-file: global.json
2424
- name: Build
2525
run: dotnet build src --configuration Release
2626
- name: Sign NuGet packages
@@ -31,7 +31,7 @@ jobs:
3131
client-secret: ${{ secrets.AZURE_KEY_VAULT_CLIENT_SECRET }}
3232
certificate-name: ${{ secrets.AZURE_KEY_VAULT_CERTIFICATE_NAME }}
3333
- name: Publish artifacts
34-
uses: actions/upload-artifact@v4.4.3
34+
uses: actions/upload-artifact@v6.0.0
3535
with:
3636
name: nugets
3737
path: nugets/*

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.100",
3+
"version": "10.0.0",
44
"rollForward": "latestFeature"
55
}
66
}

src/NServiceBus.Transport.PostgreSql.AcceptanceTests/ConfigurationHelpers.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using NServiceBus;
22
using NServiceBus.Configuration.AdvancedExtensibility;
33
using NServiceBus.Transport;
4-
using NServiceBus.Transport.PostgreSql;
54

65
static class ConfigurationHelpers
76
{
@@ -19,4 +18,4 @@ public static string QuoteSchema(string schema)
1918
{
2019
return $"\"{schema}\"";
2120
}
22-
}
21+
}

src/NServiceBus.Transport.PostgreSql.AcceptanceTests/ConfigureEndpointPostgreSqlTransport.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
using Npgsql;
66
using NServiceBus;
77
using NServiceBus.AcceptanceTesting.Support;
8-
using NServiceBus.Transport.PostgreSql;
9-
using NServiceBus.Transport.SqlServer;
108

119
public class ConfigureEndpointPostgreSqlTransport : IConfigureEndpointTestExecution
1210
{
@@ -114,4 +112,4 @@ async Task TryDeleteTables(NpgsqlConnection conn, string commandText)
114112
PostgreSqlTransport transport;
115113
string connectionString;
116114
string endpointName;
117-
}
115+
}

src/NServiceBus.Transport.PostgreSql.AcceptanceTests/MultiSchema/When_custom_schema_configured_for_error_queue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public async Task Error_should_be_sent_to_table_in_configured_schema()
2222
.Done(c => c.FailedMessageProcessed)
2323
.Run();
2424

25-
Assert.True(ctx.FailedMessageProcessed, "Message should be moved to error queue in custom schema");
25+
Assert.That(ctx.FailedMessageProcessed, Is.True, "Message should be moved to error queue in custom schema");
2626
}
2727

2828
public class Context : ScenarioContext
@@ -89,4 +89,4 @@ public class Message : ICommand { }
8989

9090
const string ErrorSpySchema = "receiver";
9191
}
92-
}
92+
}

src/NServiceBus.Transport.PostgreSql.AcceptanceTests/NServiceBus.Transport.PostgreSql.AcceptanceTests.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
4+
<TargetFramework>net10.0</TargetFramework>
55
<SignAssembly>true</SignAssembly>
66
<AssemblyOriginatorKeyFile>..\NServiceBusTests.snk</AssemblyOriginatorKeyFile>
77
</PropertyGroup>
@@ -13,9 +13,10 @@
1313
<ItemGroup>
1414
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" />
1515
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
16-
<PackageReference Include="NServiceBus.AcceptanceTests.Sources" Version="9.1.2" GeneratePathProperty="true" />
17-
<PackageReference Include="NUnit" Version="3.14.0" />
18-
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
16+
<PackageReference Include="NServiceBus.AcceptanceTests.Sources" Version="9.2.8" GeneratePathProperty="true" />
17+
<PackageReference Include="NUnit" Version="4.4.0" />
18+
<PackageReference Include="NUnit.Analyzers" Version="4.11.2" />
19+
<PackageReference Include="NUnit3TestAdapter" Version="6.1.0" />
1920
</ItemGroup>
2021

2122
<ItemGroup Condition="'$(PkgNServiceBus_AcceptanceTests_Sources)' != ''">
@@ -53,4 +54,4 @@
5354
<Compile Include="..\NServiceBus.Transport.SqlServer.AcceptanceTests\TransactionScope\When_using_scope_timeout_greater_than_machine_max.cs" LinkBase="TransactionScope" />
5455
</ItemGroup>
5556

56-
</Project>
57+
</Project>

src/NServiceBus.Transport.PostgreSql.AcceptanceTests/NServiceBusAcceptanceTest.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,23 +70,23 @@ public void TearDown()
7070

7171
if (Environment.GetEnvironmentVariable("CI") != "true" || Environment.GetEnvironmentVariable("VERBOSE_TEST_LOGGING")?.ToLower() == "true")
7272
{
73-
TestContext.WriteLine($@"Test settings:
73+
TestContext.Out.WriteLine($@"Test settings:
7474
{string.Join(Environment.NewLine, runDescriptor.Settings.Select(setting => $" {setting.Key}: {setting.Value}"))}");
7575

76-
TestContext.WriteLine($@"Context:
76+
TestContext.Out.WriteLine($@"Context:
7777
{string.Join(Environment.NewLine, scenarioContext.GetType().GetProperties().Select(p => $"{p.Name} = {p.GetValue(scenarioContext, null)}"))}");
7878
}
7979

8080
if (TestExecutionContext.CurrentContext.CurrentResult.ResultState == ResultState.Failure || TestExecutionContext.CurrentContext.CurrentResult.ResultState == ResultState.Error)
8181
{
82-
TestContext.WriteLine(string.Empty);
83-
TestContext.WriteLine($"Log entries (log level: {scenarioContext.LogLevel}):");
84-
TestContext.WriteLine("--- Start log entries ---------------------------------------------------");
82+
TestContext.Out.WriteLine(string.Empty);
83+
TestContext.Out.WriteLine($"Log entries (log level: {scenarioContext.LogLevel}):");
84+
TestContext.Out.WriteLine("--- Start log entries ---------------------------------------------------");
8585
foreach (var logEntry in scenarioContext.Logs)
8686
{
87-
TestContext.WriteLine($"{logEntry.Timestamp:T} {logEntry.Level} {logEntry.Endpoint ?? TestContext.CurrentContext.Test.Name}: {logEntry.Message}");
87+
TestContext.Out.WriteLine($"{logEntry.Timestamp:T} {logEntry.Level} {logEntry.Endpoint ?? TestContext.CurrentContext.Test.Name}: {logEntry.Message}");
8888
}
89-
TestContext.WriteLine("--- End log entries ---------------------------------------------------");
89+
TestContext.Out.WriteLine("--- End log entries ---------------------------------------------------");
9090
}
9191
}
9292
}

src/NServiceBus.Transport.PostgreSql.AcceptanceTests/NativeTimeouts/When_deferring_a_message_to_invalid_queue.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public async Task Should_forward_it_to_the_error_queue(TransportTransactionMode
4343
.Done(c => c.MessageForwardedToErrorQueue)
4444
.Run();
4545

46-
Assert.IsTrue(context.MessageForwardedToErrorQueue);
47-
Assert.AreEqual("InvalidDestination__", context.Headers[FaultsHeaderKeys.FailedQ]);
46+
Assert.That(context.MessageForwardedToErrorQueue, Is.True);
47+
Assert.That(context.Headers[FaultsHeaderKeys.FailedQ], Is.EqualTo("InvalidDestination__"));
4848
}
4949

5050
public class Context : ScenarioContext
@@ -93,4 +93,4 @@ public class MyMessage : IMessage
9393
{
9494
}
9595
}
96-
}
96+
}

src/NServiceBus.Transport.PostgreSql.AcceptanceTests/When_a_corrupted_message_is_received.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ await Scenario.Define<Context>()
7272
})
7373
.Run();
7474

75-
Assert.True(MessageExistsInErrorQueue(connectionString), "The message should have been moved to the error queue");
75+
Assert.That(MessageExistsInErrorQueue(connectionString), Is.True, "The message should have been moved to the error queue");
7676
}
7777
finally
7878
{
@@ -137,4 +137,4 @@ public class MyMessage : IMessage
137137
{
138138
}
139139
}
140-
}
140+
}

0 commit comments

Comments
 (0)