Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion x/mongo/driver/topology/topology.go
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need a test case for the change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it would be a good idea to add a test. I'll try to find a sensible assertion we can make to check that it doesn't enter a busy wait.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a test that catches the busy-wait case.

Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,6 @@ func (t *Topology) selectServerFromSubscription(
case <-ctx.Done():
return nil, ServerSelectionError{Wrapped: ctx.Err(), Desc: current}
case current = <-subscriptionCh:
default:
}

suitable, err := t.selectServerFromDescription(current, srvSelector)
Expand Down
Loading