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

service/dap: delay disconnect response and log teardown progress #2427

Merged
merged 1 commit into from
Apr 12, 2021

Conversation

polinasok
Copy link
Collaborator

Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

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

LGTM

@polinasok
Copy link
Collaborator Author

@hyangah @suzmue

@@ -222,6 +224,14 @@ func TestLaunchStopOnEntry(t *testing.T) {

// 13 >> disconnect, << disconnect
client.DisconnectRequest()
oep := client.ExpectOutputEventProcessExited(t, 0)
if oep.Seq != 0 || oep.Body.Category != "console" {
Copy link
Contributor

Choose a reason for hiding this comment

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

(beyond the scope of this pr) I wonder why check on response's Seq is necessary. DAP isn't specifying the semantic of it, is it an important property that affects the behavior and requires checking? (Afraid this is another case of change-detector tests )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was for consistency with the rest of the test. The idea was to test that we set all the counters correctly. There are a couple of tests that check counters, and the rest do not. Technically we should be setting these (#2245). It did not seem like it mattered for vscode, but looks like other clients might care (mfussenegger/nvim-dap#116). We could define a variable for counter and just increment it with every message instead of hardcoding the numbers.

Copy link
Member

@derekparker derekparker left a comment

Choose a reason for hiding this comment

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

LGTM

@derekparker derekparker merged commit aa426a2 into go-delve:master Apr 12, 2021
@polinasok polinasok deleted the Disconnect branch April 13, 2021 18:36
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