Из-за чего ошибка? Run $env:DOTNETgcServer=1 Test run for…
- User
Из-за чего ошибка?
Run $env:DOTNET_gcServer=1 Test run for /home/runner/work/space-station-14-fobos/space-station-14-fobos/bin/Content.IntegrationTests/Content.IntegrationTests.dll (.NETCoreApp,Version=v9.0) VSTest version 17.13.0 (x64)
Starting test execution, please wait... A total of 1 test files matched the specified pattern. Failed PreRoundAddAndGetSingle [34 ms] Error Message: System.InvalidOperationException : Log to pool test log handler without active test context Stack Trace: at Content.IntegrationTests.PoolTestLogHandler.Log(String sawmillName, LogEvent message) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/Content.IntegrationTests/PoolTestLogHandler.cs:line 52 at Robust.Shared.Log.LogManager.Sawmill.LogInternal(String sourceSawmill, LogEvent message) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.Shared/Log/LogManager.Sawmill.cs:line 119 at Robust.Shared.Log.LogManager.Sawmill.LogInternal(String sourceSawmill, LogEvent message) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.Shared/Log/LogManager.Sawmill.cs:line 130 at Robust.Shared.Log.LogManager.Sawmill.Log(LogLevel level, Exception exception, String message, Object[] args) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.Shared/Log/LogManager.Sawmill.cs:line 89 at Robust.Shared.GameObjects.EntityManager.FlushEntitiesInternal() in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.Shared/GameObjects/EntityManager.cs:line 777 at Robust.Shared.GameObjects.EntityManager.FlushEntities() in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.Shared/GameObjects/EntityManager.cs:line 732 at Robust.Shared.GameObjects.EntityManager.Cleanup() in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.Shared/GameObjects/EntityManager.cs:line 257 at Robust.Server.BaseServer.Cleanup() in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.Server/BaseServer.cs:line 662 at Robust.Server.BaseServer.FinishMainLoop() in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.Server/BaseServer.cs:line 555 at Robust.UnitTesting.RobustIntegrationTest.ServerIntegrationInstance._serverMain() in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.UnitTesting/RobustIntegrationTest.cs:line 658 --- End of stack trace from previous location --- at Robust.UnitTesting.RobustIntegrationTest.IntegrationInstance.WaitIdleImplAsync(Boolean throwOnUnhandled, CancellationToken cancellationToken) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.UnitTesting/RobustIntegrationTest.cs:line 450 at Robust.UnitTesting.RobustIntegrationTest.IntegrationInstance.WaitRunTicks(Int32 ticks) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/RobustToolbox/Robust.UnitTesting/RobustIntegrationTest.cs:line 542 at Content.IntegrationTests.Pair.TestPair.RunTicksSync(Int32 ticks) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/Content.IntegrationTests/Pair/TestPair.Timing.cs:line 16 at Content.IntegrationTests.Pair.TestPair.CleanPooledPair(PoolSettings settings, TextWriter testOut) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/Content.IntegrationTests/Pair/TestPair.Recycle.cs:line 146 at Content.IntegrationTests.PoolManager.GetServerClientPair(PoolSettings poolSettings) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/Content.IntegrationTests/PoolManager.cs:line 238 at Content.IntegrationTests.PoolManager.GetServerClientPair(PoolSettings poolSettings) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/Content.IntegrationTests/PoolManager.cs:line 260 at Content.IntegrationTests.PoolManager.GetServerClient(PoolSettings poolSettings) in /home/runner/work/space-station-14-fobos/space-station-14-fobos/Content.IntegrationTests/PoolManager.cs:line 187 at Content.IntegrationTests.Tests.Administration.Logs.AddTests.PreRoundAddAndGetSingle() in /home/runner/work/space-station-14-fobos/space-station-14-fobos/Content.IntegrationTests/Tests/Administration/Logs/AddTests.cs:line 211 at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter1 invoke) at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(TestExecutionContext context, Func1.b__0(Object _) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at NUnit.Framework.Internal.ContextUtils.DoIsolated(ContextCallback callback, Object state) at NUnit.Framework.Internal.ContextUtils.DoIsolated[T](Func`1 func) at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork()
- Assistant
Ошибка, с которой вы столкнулись, указывает на то, что вы пытаетесь выполнить логирование в контексте, когда тестовый контекст не активен. Вот основные моменты, на которые стоит обратить внимание:
-
Ошибка:
System.InvalidOperationException : Log to pool test log handler without active test contextЭто означает, что метод логирования вызывается, когда не существует активного тестового контекста, в котором могло бы производиться логирование.
-
Стек вызовов: Ваша ошибка инициируется в методе
Logкласса . Посмотрите на строку, где этот метод вызывается, и убедитесь, что у вас есть доступный тестовый контекст.
-
- User
- Assistant