From 0b662d34133d71a5ec46e18e8382f2d4c55f2cf3 Mon Sep 17 00:00:00 2001 From: MpakobecEx Date: Wed, 21 Oct 2026 16:10:21 +0500 Subject: [PATCH] Configure Orleans via host configuration in E2E test --- server/tests/Vanguard.Server.Tests/OrleansServerE2ETests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/tests/Vanguard.Server.Tests/OrleansServerE2ETests.cs b/server/tests/Vanguard.Server.Tests/OrleansServerE2ETests.cs index b3631e5..06e42dd 100644 --- a/server/tests/Vanguard.Server.Tests/OrleansServerE2ETests.cs +++ b/server/tests/Vanguard.Server.Tests/OrleansServerE2ETests.cs @@ -1,8 +1,10 @@ +using System.Collections.Concurrent; using System.Net.Http.Json; using System.Text.Json; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; using Vanguard.Server.Api; using Xunit.Sdk; @@ -27,7 +29,6 @@ public class OrleansServerE2ETests var firstStatus = await WaitForMatchAsync(http, firstQueue.QueueId, "p1"); var secondStatus = await WaitForMatchAsync(http, secondQueue.QueueId, "p2"); - Assert.Equal(firstStatus.MatchId, secondStatus.MatchId); using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(120)); @@ -52,7 +53,7 @@ public class OrleansServerE2ETests private static WebApplicationFactory NewFactory() => new WebApplicationFactory().WithWebHostBuilder(builder => - builder.ConfigureAppConfiguration((_, config) => + builder.ConfigureHostConfiguration(config => config.AddInMemoryCollection(new Dictionary { ["Orleans:Enabled"] = "true",