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

Wait for design mode before closing a solution #32128

Merged
merged 3 commits into from
Feb 25, 2019

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented Jan 3, 2019

This change improves integration test reliability by ensuring the debugger is terminated prior to attempting to close a solution.

📝 This pull request builds on #32122. Only the last commit is unique to this pull request.

@sharwell sharwell added Area-IDE Integration-Test Test failures in roslyn-integration-CI labels Jan 3, 2019
@sharwell sharwell added this to the 16.0.P2 milestone Jan 3, 2019
@sharwell sharwell requested a review from a team as a code owner January 3, 2019 16:18
This change improves integration test reliability by ensuring the
debugger is terminated prior to attempting to close a solution.
@sharwell sharwell force-pushed the wait-for-design-mode branch from c316ed3 to 89f6aca Compare January 3, 2019 23:33
@jinujoseph
Copy link
Contributor

@sharwell is this good to merge to master ?

@jinujoseph jinujoseph modified the milestones: 16.0.P2, 16.0.P3 Jan 18, 2019
@sharwell
Copy link
Member Author

@jinujoseph Yes as soon as it's reviewed.

@jinujoseph
Copy link
Contributor

@ivanbasov take you review this pls

Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

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

This looks like a product bug to me: the debugging session should be updated synchronously, right @tmat?

@sharwell
Copy link
Member Author

sharwell commented Feb 4, 2019

@jasonmalinowski It may be a product bug, but it still helped with integration test stability in certain edge cases from the past.

@sharwell
Copy link
Member Author

sharwell commented Feb 4, 2019

Ah, I think I remember: if a test related to debugging failed, it could end the test before the debugger terminated. This would lead to a failure to close the solution followed by a cascading failure that impacted all remaining tests, either by causing them to fail or by causing them to just time out.

@jasonmalinowski
Copy link
Member

@sharwell If that's the case, then you need the TerminateAll line but not any of the other waiting code, correct?

@sharwell
Copy link
Member Author

sharwell commented Feb 4, 2019

@jasonmalinowski No, the handling is asynchronous and I'm not aware of a direct waiter for the sequence.

@jasonmalinowski
Copy link
Member

@sharwell Why are we waiting then? Either we need a waiter or it shouldn't be necessary. What breaks?

@sharwell
Copy link
Member Author

sharwell commented Feb 4, 2019

@jasonmalinowski I don't remember what specifically broke. I found it during test hardening work in #28173.

@jasonmalinowski
Copy link
Member

@sharwell It seems to me then we should either remove the waiting (and leave the "TerminateAll") or debug further. Otherwise this really looks like integration tests are finding an actual bug here, and working around that isn't the way to go (at least not without understanding it!)

@sharwell
Copy link
Member Author

@jasonmalinowski I found the issue. When attempting to fix CSharpImmediate.DumpLocalVariableValue (#25814), the test hangs because the debugger is left running when an assertion fails in the middle of a test and then the test cleanup operations attempt to close the solution with the debugger running.

@sharwell sharwell modified the milestones: 16.0.P3, 16.1.P1 Feb 25, 2019
@sharwell sharwell changed the base branch from master to dev16.0 February 25, 2019 16:40
@sharwell sharwell modified the milestones: 16.1.P1, 16.0.P4 Feb 25, 2019
@sharwell
Copy link
Member Author

@jasonmalinowski @tmat I moved this back to dev16.0. I cannot proceed with 16.0 integration testing without this change (it blocks an upcoming PR).

@sharwell sharwell force-pushed the wait-for-design-mode branch from cb69989 to c0d2d5f Compare February 25, 2019 17:55
@jasonmalinowski jasonmalinowski dismissed their stale review February 25, 2019 18:51

Dismissing my block, since "we're doing this to cleanup the potential broken state once the test failed" makes good sense.

@sharwell
Copy link
Member Author

📝 The debug test failure was caused by this temporary state issue:

image

@sharwell
Copy link
Member Author

Release build passed 👍

@sharwell sharwell merged commit 367787e into dotnet:dev16.0 Feb 25, 2019
@sharwell sharwell deleted the wait-for-design-mode branch February 25, 2019 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Integration-Test Test failures in roslyn-integration-CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants