Skip to content

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

Merged
timothy-kim-mongo merged 19 commits intomongodb:v1from
timothy-kim-mongo:GODRIVER-2667
Jun 14, 2024
Merged

GODRIVER-2667 Replacing the assert.Soon with the assert.Eventually function#1668
timothy-kim-mongo merged 19 commits intomongodb:v1from
timothy-kim-mongo:GODRIVER-2667

Conversation

@timothy-kim-mongo
Copy link
Copy Markdown
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 review-priority-low Low Priority PR for Review: within 3 business days labels Jun 10, 2024
@mongodb-drivers-pr-bot
Copy link
Copy Markdown
Contributor

API Change Report

No changes found!

Comment thread internal/assert/assertions.go
Comment thread mongo/integration/client_test.go Outdated
Comment thread mongo/integration/client_test.go Outdated
@prestonvasquez
Copy link
Copy Markdown
Member

@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
Copy Markdown
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!

Comment thread mongo/integration/client_test.go Outdated
Comment thread mongo/integration/client_test.go
@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
Copy Markdown
Member

@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.

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

Accidental approval

Comment thread mongo/integration/unified_runner_events_helper_test.go Outdated
Comment thread mongo/integration/client_test.go Outdated
Comment thread mongo/integration/csot_prose_test.go Outdated
Comment thread mongo/integration/unified_runner_events_helper_test.go Outdated
Comment thread mongo/integration/unified_runner_events_helper_test.go Outdated
Comment thread mongo/integration/sdam_error_handling_test.go Outdated
Comment thread mongo/integration/sdam_error_handling_test.go Outdated
Comment thread mongo/integration/sdam_error_handling_test.go Outdated
Comment thread x/mongo/driver/topology/topology_errors_test.go Outdated
Copy link
Copy Markdown
Member

@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 👍

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 review-priority-low Low Priority PR for Review: within 3 business days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants