Skip to content

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

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