Skip to content

Commit a3fbc50

Browse files
Bump dotnet-sdk from 10.0.403 to 11.0.100 (#162)
1 parent fa0b531 commit a3fbc50

5 files changed

Lines changed: 17 additions & 11 deletions

File tree

‎Directory.Build.props‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929

3030
<!-- Tests: latest TFM, references matching library build -->
3131
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'SharpDicom.Tests'">
32-
<TargetFramework>net10.0</TargetFramework>
32+
<TargetFramework>net11.0</TargetFramework>
3333
<IsPackable>false</IsPackable>
3434
</PropertyGroup>
3535

36-
<!-- Polyfill Tests: net10.0 runtime but forces netstandard2.0 library reference -->
36+
<!-- Polyfill Tests: net11.0 runtime but forces netstandard2.0 library reference -->
3737
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'SharpDicom.Tests.Polyfills'">
38-
<TargetFramework>net10.0</TargetFramework>
38+
<TargetFramework>net11.0</TargetFramework>
3939
<IsPackable>false</IsPackable>
4040
</PropertyGroup>
4141

@@ -46,7 +46,7 @@
4646

4747
<!-- FoDicom5 Compat Tests: latest TFM -->
4848
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'SharpDicom.FoDicom5.Compat.Tests'">
49-
<TargetFramework>net10.0</TargetFramework>
49+
<TargetFramework>net11.0</TargetFramework>
5050
<IsPackable>false</IsPackable>
5151
</PropertyGroup>
5252

@@ -57,19 +57,19 @@
5757

5858
<!-- FoDicom4 Compat Tests: latest TFM -->
5959
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'SharpDicom.FoDicom4.Compat.Tests'">
60-
<TargetFramework>net10.0</TargetFramework>
60+
<TargetFramework>net11.0</TargetFramework>
6161
<IsPackable>false</IsPackable>
6262
</PropertyGroup>
6363

6464
<!-- Migration Integration Tests: validates dcm2csv compiles against compat layer -->
6565
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'SharpDicom.Migration.Integration'">
66-
<TargetFramework>net10.0</TargetFramework>
66+
<TargetFramework>net11.0</TargetFramework>
6767
<IsPackable>false</IsPackable>
6868
</PropertyGroup>
6969

7070
<!-- Analyzer Tests: Roslyn analyzer and code fix testing -->
7171
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'SharpDicom.Analyzers.Tests'">
72-
<TargetFramework>net10.0</TargetFramework>
72+
<TargetFramework>net11.0</TargetFramework>
7373
<IsPackable>false</IsPackable>
7474
</PropertyGroup>
7575

‎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": "10.0.403",
3+
"version": "11.0.100",
44
"rollForward": "latestFeature"
55
},
66
"test": {

‎src/SharpDicom/Network/DicomServer.cs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2178,9 +2178,13 @@ public async Task StopAsync()
21782178
if (tasks.Length > 0)
21792179
{
21802180
var allCompleted = Task.WhenAll(tasks);
2181+
using var timeoutCts = new CancellationTokenSource();
21812182
await Task.WhenAny(
21822183
allCompleted,
2183-
Task.Delay(_options.ShutdownTimeout)).ConfigureAwait(false);
2184+
Task.Delay(_options.ShutdownTimeout, timeoutCts.Token)).ConfigureAwait(false);
2185+
2186+
// Stop the timer if the associations finished first
2187+
timeoutCts.Cancel();
21842188

21852189
// If timeout elapsed and tasks still running, they'll be abandoned
21862190
// (the CancellationToken is already cancelled, so they should exit soon)

‎tests/SharpDicom.Codecs.Tests/SharpDicom.Codecs.Tests.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
3+
<TargetFramework>net11.0</TargetFramework>
44
<IsPackable>false</IsPackable>
55
<IsTestProject>true</IsTestProject>
66
<Nullable>enable</Nullable>

‎tests/SharpDicom.Tests/Network/DicomServerTests.cs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,9 @@ public async Task DicomServer_OnAssociationRequest_CalledWithCorrectContext()
347347

348348
// Wait for handler to be called with timeout
349349
var handlerTask = handlerTcs.Task;
350-
var completedTask = await Task.WhenAny(handlerTask, Task.Delay(2000));
350+
using var timeoutCts = new CancellationTokenSource();
351+
var completedTask = await Task.WhenAny(handlerTask, Task.Delay(2000, timeoutCts.Token));
352+
timeoutCts.Cancel();
351353

352354
if (completedTask != handlerTask)
353355
{

0 commit comments

Comments
 (0)