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

GODRIVER-2667 Replacing the assert.Soon with the assert.Eventually function #1668

Merged
merged 19 commits into from
Jun 14, 2024

Conversation

timothy-kim-mongo
Copy link
Contributor

GODRIVER-2667

Summary

The changes in this pull-request answers the ticket GODRIVER-2667 of replacing the assert.Soon with the assert.Eventually function. It may useful to note that assert.Eventually used in the code does not check initially whether the condition is satisfied meaning it must wait a minimum of the tick duration as according to #1424.

Background & Motivation

In removing the testify dependency and using a vendored subset (GODRIVER-2179), there were a number of calls to assert.Soon that became helpers.AssertSoon (testify has no perfectly analogous function). The motivation was to remove helpers.AssertSoon and refactor all calls to use assert.Eventually.

@timothy-kim-mongo timothy-kim-mongo self-assigned this Jun 10, 2024
@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added dependencies Pull requests that update a dependency file priority-3-low Low Priority PR for Review labels Jun 10, 2024
Copy link
Contributor

API Change Report

No changes found!

internal/assert/assertions.go Outdated Show resolved Hide resolved
mongo/integration/client_test.go Outdated Show resolved Hide resolved
mongo/integration/client_test.go Outdated Show resolved Hide resolved
@prestonvasquez
Copy link
Collaborator

@timothy-kim-mongo Could you update the title of this PR to reflect the changes being made?

@timothy-kim-mongo timothy-kim-mongo changed the title GODRIVER-2667 Ticket PR GODRIVER-2667 replacing the assert.Soon with the assert.Eventually function Jun 10, 2024
@timothy-kim-mongo timothy-kim-mongo changed the title GODRIVER-2667 replacing the assert.Soon with the assert.Eventually function GODRIVER-2667 Replacing the assert.Soon with the assert.Eventually function Jun 10, 2024
@timothy-kim-mongo
Copy link
Contributor Author

@timothy-kim-mongo Could you update the title of this PR to reflect the changes being made?

Sounds good, just made the title change along with the other changes you mentioned!

mongo/integration/client_test.go Outdated Show resolved Hide resolved
mongo/integration/client_test.go Show resolved Hide resolved
@prestonvasquez prestonvasquez requested review from blink1073 and removed request for matthewdale June 10, 2024 22:20
prestonvasquez
prestonvasquez previously approved these changes Jun 11, 2024
Copy link
Collaborator

@prestonvasquez prestonvasquez left a comment

Choose a reason for hiding this comment

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

Please go through the remaining assert.Eventually tests and apply the changes we made for client_test.go.

mongo/integration/client_test.go Outdated Show resolved Hide resolved
mongo/integration/csot_prose_test.go Outdated Show resolved Hide resolved
mongo/integration/csot_prose_test.go Outdated Show resolved Hide resolved
mongo/integration/sdam_error_handling_test.go Outdated Show resolved Hide resolved
mongo/integration/sdam_error_handling_test.go Outdated Show resolved Hide resolved
mongo/integration/sdam_error_handling_test.go Outdated Show resolved Hide resolved
@prestonvasquez prestonvasquez self-requested a review June 11, 2024 19:55
@prestonvasquez prestonvasquez dismissed their stale review June 11, 2024 19:56

Accidental approval

mongo/integration/client_test.go Outdated Show resolved Hide resolved
mongo/integration/csot_prose_test.go Outdated Show resolved Hide resolved
mongo/integration/unified_runner_events_helper_test.go Outdated Show resolved Hide resolved
mongo/integration/unified_runner_events_helper_test.go Outdated Show resolved Hide resolved
mongo/integration/sdam_error_handling_test.go Outdated Show resolved Hide resolved
mongo/integration/sdam_error_handling_test.go Outdated Show resolved Hide resolved
mongo/integration/sdam_error_handling_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@prestonvasquez prestonvasquez left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@timothy-kim-mongo timothy-kim-mongo merged commit fb39da8 into mongodb:v1 Jun 14, 2024
24 of 28 checks passed
@timothy-kim-mongo timothy-kim-mongo deleted the GODRIVER-2667 branch June 14, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file priority-3-low Low Priority PR for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants