diff --git a/test/Microsoft.IdentityModel.TestUtils/IdentityComparer.cs b/test/Microsoft.IdentityModel.TestUtils/IdentityComparer.cs index d1b1414f7f..f3152b4d34 100644 --- a/test/Microsoft.IdentityModel.TestUtils/IdentityComparer.cs +++ b/test/Microsoft.IdentityModel.TestUtils/IdentityComparer.cs @@ -1473,17 +1473,6 @@ internal static bool AreValidationErrorsEqual(ValidationError validationError1, { localContext.Diffs.Add($"exception1.StackTrace is null. Exception type: {exception1.GetType().Name}"); } - else - { - // If the stack trace is present, ensure it contains the expected amount of frames. - var stackTraceFrames = exception1.StackTrace.Trim('\n').Split('\n').Where(s => !s.IsNullOrEmpty()); - if (stackTraceFrames.Count() != validationError2.StackFrames.Count) - { - localContext.Diffs.Add($"(exception1.StackTrace.Trim('\\n\').Split('\\n').Count() != validationError2.StackFrames.Count: " + - $"{stackTraceFrames.Count()}, {validationError2.StackFrames.Count})"); - localContext.Diffs.Add($"exception1.StackTrace: {exception1.StackTrace}"); - } - } return context.Merge(localContext); }