From 233e73df21e7b2587e767e1ab29213d572145fa6 Mon Sep 17 00:00:00 2001 From: Hamed Ansarian Date: Sat, 7 Feb 2026 14:36:35 +0100 Subject: [PATCH] fix: update connection multiplexer type and dispose method in integration tests --- .../DistributedLockServiceIntegrationTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/DistributedLockManager.Tests/DistributedLockServiceIntegrationTests.cs b/tests/DistributedLockManager.Tests/DistributedLockServiceIntegrationTests.cs index f1da191..96dcf1e 100644 --- a/tests/DistributedLockManager.Tests/DistributedLockServiceIntegrationTests.cs +++ b/tests/DistributedLockManager.Tests/DistributedLockServiceIntegrationTests.cs @@ -17,7 +17,7 @@ public class DistributedLockServiceIntegrationTests { private IServiceScope? scope; private IContainer? _redisContainer; - private IConnectionMultiplexer? _connectionMultiplexer; + private ConnectionMultiplexer? _connectionMultiplexer; private const string RedisImage = "redis:latest"; private const int RedisPort = 6379; @@ -60,7 +60,8 @@ public async Task OneTimeSetUp() public async Task OneTimeTearDown() { scope?.Dispose(); - _connectionMultiplexer?.Dispose(); + if (_connectionMultiplexer is not null) + await _connectionMultiplexer.DisposeAsync(); if (_redisContainer is not null) await _redisContainer.StopAsync();