-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix setting of json serializer to ignore self referencing loop #796
Conversation
…ages in vstest\package folder
1) microsoft#706 2) microsoft#618 Fix: Don’t serialize the type if that have self-referencing loop
@Faizan2304, |
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
[TestClass] | ||
public class JsonDataSerializerTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a test as part of TestResultSerializationTests
? This will ensure the bug scenario is guarded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be the best way to write test for this bug but unfortunately we cant because we are not able to create an exception object which we can pass to TestRunCompleteEventArgs.
DateTimeZoneHandling = DateTimeZoneHandling.Utc, | ||
TypeNameHandling = TypeNameHandling.None, | ||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add same setting in other place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure exception in serialize get logged in eqttrace log file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in next commit.
@dotnet-bot test Windows_NT / Debug Build |
Issue:
Fix:
Don’t serialize the type if that have self-referencing loop