Fix failure to dispose RemoteWorkspace in tests#48077
Merged
sharwell merged 1 commit intodotnet:masterfrom Sep 28, 2020
Merged
Conversation
sharwell
commented
Sep 26, 2020
| // Directly dispose IRemoteHostClientProvider if necessary. This is a test hook to ensure RemoteWorkspace | ||
| // gets disposed in unit tests as soon as TestWorkspace gets disposed. This would be superseded by direct | ||
| // support for IDisposable in https://github.com/dotnet/roslyn/pull/47951. | ||
| if (Services.GetService<IRemoteHostClientProvider>() is IDisposable disposableService) |
Contributor
Author
There was a problem hiding this comment.
📝 My one concern here is what happens if this triggers the JIT to try and load one of our optional dependencies which isn't relevant for typical command line Workspace usage. I couldn't find any direct indication that this would occur, but the possibility leaves me with a preference towards #47951 which is a much cleaner approach.
jaredpar
approved these changes
Sep 28, 2020
Contributor
Author
|
@jasonmalinowski @CyrusNajmabadi I'm merging this to unblock the performance advantage. It needs to be cleaned up by #47951 and then #48069. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request implements the target functionality from #48069 using a workaround for a case where #47951 is not yet merged. If the latter change is approved, this pull request is no longer necessary.
Disposing of the
RemoteWorkspaceinstance provides a tremendous performance advantage during test cleanup.