Skip to content

Commit

Permalink
SLVS-1377 Disconnect from sonarQube service on unbinding project
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriela-trutan-sonarsource committed Dec 9, 2024
1 parent 8aab68d commit ffa9de6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public async Task BindAsync_CallsBindingProcessInOrder()
}

[TestMethod]
public void Unbind_BindingDeletionSucceeded_HandlesBindingChanges()
public void Unbind_BindingDeletionSucceeded_HandlesBindingChangesAndDisconnects()
{
solutionBindingRepository.DeleteBinding(AnyBoundProject.LocalBindingKey).Returns(true);

Expand All @@ -126,6 +126,7 @@ public void Unbind_BindingDeletionSucceeded_HandlesBindingChanges()
Received.InOrder(() =>
{
solutionBindingRepository.DeleteBinding(AnyBoundProject.LocalBindingKey);
sonarQubeService.Disconnect();
activeSolutionChangedHandler.HandleBindingChange(true);
});
}
Expand Down
1 change: 1 addition & 0 deletions src/ConnectedMode/Binding/IUnintrusiveBindingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public bool Unbind(string localBindingKey)
var bindingDeleted = solutionBindingRepository.DeleteBinding(localBindingKey);
if (bindingDeleted)
{
sonarQubeService.Disconnect();
activeSolutionChangedHandler.HandleBindingChange(true);
}
return bindingDeleted;
Expand Down

0 comments on commit ffa9de6

Please sign in to comment.