diff --git a/src/Testcontainers.WebDriver/WebDriverContainer.cs b/src/Testcontainers.WebDriver/WebDriverContainer.cs index c9534ce99..4797d6e0d 100644 --- a/src/Testcontainers.WebDriver/WebDriverContainer.cs +++ b/src/Testcontainers.WebDriver/WebDriverContainer.cs @@ -57,7 +57,7 @@ public async Task ExportVideoAsync(string target, CancellationToken ct = default var bytes = await _ffmpegContainer.ReadFileAsync(WebDriverBuilder.VideoFilePath, ct) .ConfigureAwait(false); -#if NET6_0_OR_GREATER +#if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER await File.WriteAllBytesAsync(target, bytes, ct) .ConfigureAwait(false); #else diff --git a/src/Testcontainers/Configurations/WaitStrategies/RetryLimitExceededException.cs b/src/Testcontainers/Configurations/WaitStrategies/RetryLimitExceededException.cs index 8dd1f8420..9e5728220 100644 --- a/src/Testcontainers/Configurations/WaitStrategies/RetryLimitExceededException.cs +++ b/src/Testcontainers/Configurations/WaitStrategies/RetryLimitExceededException.cs @@ -4,18 +4,9 @@ namespace DotNet.Testcontainers.Configurations public sealed class RetryLimitExceededException : Exception { - public RetryLimitExceededException() - { - } - public RetryLimitExceededException(string message) : base(message) { } - - public RetryLimitExceededException(string message, Exception inner) - : base(message, inner) - { - } } } diff --git a/src/Testcontainers/Containers/DockerContainer.cs b/src/Testcontainers/Containers/DockerContainer.cs index c51879071..7751bfdd5 100644 --- a/src/Testcontainers/Containers/DockerContainer.cs +++ b/src/Testcontainers/Containers/DockerContainer.cs @@ -575,7 +575,7 @@ public WaitUntilPortBindingsMapped(DockerContainer parent) _ = WithTimeout(TimeSpan.FromSeconds(15)); } - public override Task UntilAsync(IContainer _, CancellationToken ct = default) + public override Task UntilAsync(IContainer container, CancellationToken ct = default) { var boundPorts = _parent._container.NetworkSettings.Ports.Values.Where(portBindings => portBindings != null).SelectMany(portBinding => portBinding).Count(portBinding => !string.IsNullOrEmpty(portBinding.HostPort)); return Task.FromResult(_parent._configuration.PortBindings == null || /* IPv4 or IPv6 */ _parent._configuration.PortBindings.Count == boundPorts || /* IPv4 and IPv6 */ 2 * _parent._configuration.PortBindings.Count == boundPorts); diff --git a/src/Testcontainers/Containers/ResourceReaper.cs b/src/Testcontainers/Containers/ResourceReaper.cs index 9242b30c9..fb511b303 100644 --- a/src/Testcontainers/Containers/ResourceReaper.cs +++ b/src/Testcontainers/Containers/ResourceReaper.cs @@ -156,7 +156,7 @@ public async ValueTask DisposeAsync() try { -#if NET8_0_OR_GREATER +#if NET6_0_OR_GREATER await _maintainConnectionCts.CancelAsync() .ConfigureAwait(false); #else diff --git a/src/Testcontainers/Containers/ResourceReaperException.cs b/src/Testcontainers/Containers/ResourceReaperException.cs index c79bf79b4..f1784141b 100644 --- a/src/Testcontainers/Containers/ResourceReaperException.cs +++ b/src/Testcontainers/Containers/ResourceReaperException.cs @@ -2,7 +2,6 @@ namespace DotNet.Testcontainers.Containers { using System; - [Serializable] public sealed class ResourceReaperException : Exception { public ResourceReaperException(string message)