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

connmgr: Stale comment in TestRemovePendingConnection #1748

Closed
sloorush opened this issue Sep 6, 2021 · 0 comments · Fixed by #1749
Closed

connmgr: Stale comment in TestRemovePendingConnection #1748

sloorush opened this issue Sep 6, 2021 · 0 comments · Fixed by #1749

Comments

@sloorush
Copy link
Contributor

sloorush commented Sep 6, 2021

in TestRemovePendingConnection

// Now examine the status of the connection request, it should read a
// status of failed.
if cr.State() != ConnCanceled {
t.Fatalf("request wasn't canceled, status is: %v", cr.State())
}

The comment says that it should read a cr.State() of ConnFailing but it gives a fatal when it is not ConnCanceled ie ConnFailing.

The comment is stale as the test was added here
548c0f4#diff-ed803b6cfd814b3d3d6846a89c2bedd39bd560d7a782b9fb1da42560451dd0a0

and it was changed to check for ConnCanceled here
b26daff#diff-ed803b6cfd814b3d3d6846a89c2bedd39bd560d7a782b9fb1da42560451dd0a
but the comment was not changed

Solution

Changing the comment to

// Now examine the status of the connection request, it should read a 
// status of ConnCanceled.

should resolve the confusion

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 a pull request may close this issue.

1 participant