Edit: Seems like other people were having this issue: Test Runner stuck in invalid test state
Hey all,
I accidentally saved after copy pasting a test, and now I’m getting an error about 100 times a second continuously.
Even when I take out the offending test, I can’t clear this error. Basically nothing I do gets rid of it, even when I delete this file. It’s been driving me crazy, so any help would be much appreciated.
Here’s the stack trace:
ArgumentException: An item with the same key has already been added. Key: Tests.dll/Tests/Gameplay/Core/TestMapStateWrapper/TestPositionIndexing/[Tests][Tests.Gameplay.Core.TestMapStateWrapper.TestPositionIndexing(float3(0f, 0f, 0f))]
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.List`1[T] source, System.Func`2[T,TResult] keySelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <2a397996daff412691ae4781443e8e88>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <2a397996daff412691ae4781443e8e88>:0)
System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector) (at <2a397996daff412691ae4781443e8e88>:0)
UnityEditor.TestTools.TestRunner.GUI.TestListGUI.get_ResultsByKey () (at ./Library/PackageCache/com.unity.test-framework@1.1.33/UnityEditor.TestRunner/GUI/Views/TestListGUIBase.cs:44)
UnityEditor.TestTools.TestRunner.GUI.TestListTreeViewDataSource.FetchData () (at ./Library/PackageCache/com.unity.test-framework@1.1.33/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewDataSource.cs:35)
UnityEditor.IMGUI.Controls.TreeViewDataSource.ReloadData () (at <78fe3e0b66cf40fc8dbec96aa3584483>:0)
UnityEditor.IMGUI.Controls.TreeViewController.ReloadData () (at <78fe3e0b66cf40fc8dbec96aa3584483>:0)
UnityEditor.TestTools.TestRunner.GUI.TestListGUI.Reload () (at ./Library/PackageCache/com.unity.test-framework@1.1.33/UnityEditor.TestRunner/GUI/Views/TestListGUIBase.cs:202)
UnityEditor.TestTools.TestRunner.TestRunnerWindow+<>c__DisplayClass27_0.<StartRetrieveTestList>b__0 (UnityEditor.TestTools.TestRunner.Api.ITestAdaptor rootTest) (at ./Library/PackageCache/com.unity.test-framework@1.1.33/UnityEditor.TestRunner/TestRunnerWindow.cs:162)
UnityEditor.TestTools.TestRunner.Api.TestRunnerApi+<>c__DisplayClass8_0.<RetrieveTestList>b__0 (UnityEditor.TestTools.TestRunner.Api.ITestAdaptor testRoot) (at ./Library/PackageCache/com.unity.test-framework@1.1.33/UnityEditor.TestRunner/Api/TestRunnerApi.cs:143)
UnityEditor.TestTools.TestRunner.TestListJob.EditorUpdate () (at ./Library/PackageCache/com.unity.test-framework@1.1.33/UnityEditor.TestRunner/TestRunner/Utils/TestListJob.cs:31)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <78fe3e0b66cf40fc8dbec96aa3584483>:0)
I’m on 2022.3.16f1 and I’m using ECS.