`BackendTest`: Fix test
MODIFY
WalletWasabi.Tests/RegressionTests/BackendTests.cs
WalletWasabi.Tests/RegressionTests/BackendTests.cs
+using Microsoft.Extensions.Caching.Memory;
+using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
using System.Collections.Generic;
using System.IO;
@@ -239,7 +241,7 @@ public class BackendTests
await rpc.GenerateAsync(1);
- var blockchainController = (BlockchainController)RegTestFixture.BackendHost.Services.GetService(typeof(BlockchainController))!;
+ var blockchainController = RegTestFixture.BackendHost.Services.GetRequiredService<BlockchainController>();
blockchainController.Cache.Remove($"{nameof(BlockchainController.GetStatusAsync)}");
segwitTaprootIndexBuilderService = global.SegwitTaprootIndexBuilderService;

MODIFY
WalletWasabi/Cache/IdempotencyRequestCache.cs
WalletWasabi/Cache/IdempotencyRequestCache.cs
@@ -119,4 +119,16 @@ public class IdempotencyRequestCache
}
}
}
+
+ /// <remarks>
+ /// For testing purposes only.
+ /// <para>Note that if there is a simultaneous request for the cache key, it is not stopped and its result is discarded.</para>
+ /// </remarks>
+ internal void Remove<TRequest>(TRequest cacheKey)
+ {
+ lock (ResponseCacheLock)
+ {
+ ResponseCache.Remove(cacheKey);
+ }
+ }
}

`BackendTest`: Fix test