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

metamorphic: add a test option to make downloadOp no-op #4159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itsbilal
Copy link
Member

Previously, if we had external storage enabled, we'd always download in a download op. This meant we didn't really test cases where a download could change the state of the LSM relative to not doing the download.

This change adds a metamorphic test option (toggled randomly) that disables the download operation in 50% of runs.

Previously, if we had external storage enabled, we'd always
download in a download op. This meant we didn't really test cases
where a download could change the state of the LSM relative to not
doing the download.

This change adds a metamorphic test option (toggled randomly) that
disables the download operation in 50% of runs.
@itsbilal itsbilal requested a review from a team as a code owner November 12, 2024 20:25
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @itsbilal)


metamorphic/ops.go line 207 at r1 (raw file):

func (o *downloadOp) run(t *Test, h historyRecorder) {
	if t.testOpts.disableDownloads {
		h.Recordf("%s // %v", o, nil)

is there something that could cause the Download to fail and so a non-nil error would cause a false positive diff and test failure?

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.

3 participants