Skip to content

Commit 12cccf9

Browse files
committed
chore: Bump System.Text.Json
1 parent 159e4bf commit 12cccf9

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageVersion Include="ReflectionMagic" Version="5.0.1"/>
1414
<PackageVersion Include="SharpZipLib" Version="1.4.2"/>
1515
<PackageVersion Include="SSH.NET" Version="2023.0.0"/>
16-
<PackageVersion Include="System.Text.Json" Version="6.0.9"/>
16+
<PackageVersion Include="System.Text.Json" Version="6.0.10"/>
1717
<!-- Unit and integration test dependencies: -->
1818
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
1919
<PackageVersion Include="Microsoft.Extensions.Diagnostics.Testing" Version="8.9.1"/>

src/Testcontainers.WebDriver/WebDriverContainer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ public async Task ExportVideoAsync(string target, CancellationToken ct = default
5757
var bytes = await _ffmpegContainer.ReadFileAsync(WebDriverBuilder.VideoFilePath, ct)
5858
.ConfigureAwait(false);
5959

60+
#if NET6_0_OR_GREATER
61+
await File.WriteAllBytesAsync(target, bytes, ct)
62+
.ConfigureAwait(false);
63+
#else
6064
File.WriteAllBytes(target, bytes);
65+
#endif
6166
}
6267

6368
/// <inheritdoc />

src/Testcontainers/Containers/ResourceReaper.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,12 @@ public async ValueTask DisposeAsync()
156156

157157
try
158158
{
159+
#if NET8_0_OR_GREATER
160+
await _maintainConnectionCts.CancelAsync()
161+
.ConfigureAwait(false);
162+
#else
159163
_maintainConnectionCts.Cancel();
164+
#endif
160165

161166
// Close connection before disposing Resource Reaper.
162167
await _maintainConnectionTask

0 commit comments

Comments
 (0)