Skip to content

GODRIVER-1824 Test that Client waits 500ms between failed Hellos #838

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

Merged
merged 3 commits into from
Jan 19, 2022
Merged

GODRIVER-1824 Test that Client waits 500ms between failed Hellos #838

merged 3 commits into from
Jan 19, 2022

Conversation

benjirewis
Copy link
Contributor

GODRIVER-1824

Implement the prose test described in DRIVERS-1251. This test verifies that the driver waits approximately 500ms between failing hellos and legacy hellos.

@benjirewis benjirewis marked this pull request as ready for review January 18, 2022 18:05
},
Data: mtest.FailPointData{
FailCommands: []string{internal.LegacyHello, "hello"},
ErrorCode: 1234,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this error code important, or can it be any value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could be any value I think. 1234 was just a placeholder from the spec tests. I could remove it since we don't assert anything about the error code, but I'll probably just leave it in for consistency with other drivers.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I didn't realize that value came directly from the prose test. Should we consider adding links to the relevant prose test or the GODRIVER ticket to keep a record of what tests cover what prose tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The GODRIVER ticket already links to a DRIVERS ticket with the specified prose test. However, I do think our prose tests could be better labeled/numbered, so I filed GODRIVER-2274. Probably out of scope for this PR, though.

@@ -108,4 +108,34 @@ func TestSDAMProse(t *testing.T) {
assert.Soon(t, callback, defaultCallbackTimeout)
})
})

mt.RunOpts("client waits between failed Hellos", mtest.NewOptions().MinServerVersion("4.9").Topologies(mtest.Single), func(mt *mtest.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only running this test against standalones since it's using DirectConnection: true which will error against replica sets and sharded clusters.

Copy link
Collaborator

@matthewdale matthewdale left a comment

Choose a reason for hiding this comment

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

Looks good 👍

},
Data: mtest.FailPointData{
FailCommands: []string{internal.LegacyHello, "hello"},
ErrorCode: 1234,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I didn't realize that value came directly from the prose test. Should we consider adding links to the relevant prose test or the GODRIVER ticket to keep a record of what tests cover what prose tests?

@benjirewis benjirewis merged commit cec2f72 into mongodb:master Jan 19, 2022
@benjirewis benjirewis deleted the failedHello.1824 branch January 19, 2022 15:34
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.

2 participants