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

Add round-trip test for time-series with a TTL index #777

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

FGasper
Copy link
Collaborator

@FGasper FGasper commented Mar 24, 2025

This also adds a new convenience for skipping a test if the cluster’s FCV isn’t recent enough.

@FGasper FGasper marked this pull request as ready for review March 24, 2025 19:30
@FGasper FGasper requested a review from shyam12860 March 24, 2025 19:30

// GetFCV is like GetFCVErr but panicks instead of returning an error.
// Avoid this function in new code.
func GetFCV(s *mongo.Client) string {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: should we call this GetFCVFatal or similar?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nvm this is in use already and renaming requires renaming everything

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I mean, renaming is easy enough with IDEs … I’ll call it GetFCVOrPanic.

restore, err := getRestoreWithArgs(args...)
require.NoError(t, err, "restore should run")
defer restore.Close()

Copy link
Collaborator

@shyam12860 shyam12860 Mar 24, 2025

Choose a reason for hiding this comment

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

Are there any specific checks related to restoration of the TTL index that we should include in this test? Like checking if the index was restored with the right TTL for example

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Doh! Yes, I should add that.

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