Skip to content
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

Merged
merged 5 commits into from
May 11, 2017

Conversation

Faizan2304
Copy link
Contributor

Issue:

  1. vstest.console hangs indefinitely if testhost dies #706
  2. Vstest.console hangs on testhost abnormal exit. #618

Fix:
Don’t serialize the type if that have self-referencing loop

1) microsoft#706
2) microsoft#618

Fix:
Don’t serialize the type if that have self-referencing loop
@Faizan2304 Faizan2304 requested review from codito and smadala May 10, 2017 13:38
@msftclas
Copy link

@Faizan2304,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@Faizan2304 Faizan2304 changed the title Fix seeting of json serializer to ignore self referencing loop Fix setting of json serializer to ignore self referencing loop May 10, 2017
using Microsoft.VisualStudio.TestTools.UnitTesting;

[TestClass]
public class JsonDataSerializerTests
Copy link
Contributor

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.

Copy link
Contributor Author

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
});
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in next commit.

@Faizan2304
Copy link
Contributor Author

@dotnet-bot test Windows_NT / Debug Build

@Faizan2304 Faizan2304 merged commit 333752b into microsoft:master May 11, 2017
@Faizan2304 Faizan2304 deleted the jsonSerialize branch May 11, 2017 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants