You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.LogWarningWithSource(assemblyFileName,"Skipping test case with duplicate ID '{0}' ('{1}' and '{2}')",uniqueID,testCasesMap[uniqueID].DisplayName,filteredTestCase.VSTestCase?.DisplayName);
logger.LogWarningWithSource(assemblyFileName,"Skipping test case '{0}' (ID '{1}') without serialization",filteredTestCase.TestCase.TestCaseDisplayName,filteredTestCase.TestCase.TestCaseUniqueID);
logger.LogWarningWithSource(assemblyFileName,"Skipping test case with duplicate ID '{0}' ('{1}' and '{2}')",uniqueID,testCasesMap[uniqueID].DisplayName,filteredTestCase.VSTestCase?.DisplayName);
logger.LogWarningWithSource(assemblyFileName,"VSTestCase {0} did not have an associated unique ID",testCase.DisplayName);
579
-
elseif(testCasesMap.ContainsKey(uniqueID))
580
-
logger.LogWarningWithSource(assemblyFileName,"Skipping test case with duplicate ID '{0}' ('{1}' and '{2}')",uniqueID,testCasesMap[uniqueID].DisplayName,testCase.DisplayName);
581
580
elseif(string.IsNullOrEmpty(serialization))
582
581
logger.LogWarningWithSource(assemblyFileName,"Skipping test case '{0}' (ID '{1}') without serialization",testCase.DisplayName,uniqueID);
583
582
else
584
583
{
585
-
testCasesMap[uniqueID]=testCase;
586
-
testCaseSerializations.Add(serialization);
584
+
if(testCasesMap.TryAdd(uniqueID,testCase))
585
+
testCaseSerializations.Add(serialization);
586
+
else
587
+
logger.LogWarningWithSource(assemblyFileName,"Skipping test case with duplicate ID '{0}' ('{1}' and '{2}')",uniqueID,testCasesMap[uniqueID].DisplayName,testCase.DisplayName);
0 commit comments