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

Move fail point structs to an internal package. #1833

Merged
merged 2 commits into from
Sep 28, 2024

Conversation

matthewdale
Copy link
Collaborator

Summary

Move the mtest.FailPoint struct and the associated structs to a new internal package internal/failpoint.

Background & Motivation

Most fail points in Go Driver integration tests are defined using the mtest.FailPoint type. However, some integration tests, like TestConvenientTransactions, cannot use mtest because it creates an import cycle. We can move the FailPoint and associated structs to a separate internal package, allowing them to be used in any test package in the driver.

Note that the SetFailPoint function is intentionally not moved to the internal/failpoint package because that would require importing the mongo package, causing an import cycle in some cases.

@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the priority-3-low Low Priority PR for Review label Sep 27, 2024
Copy link
Contributor

API Change Report

No changes found!

@matthewdale matthewdale merged commit 83cb61c into mongodb:master Sep 28, 2024
31 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3-low Low Priority PR for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants