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

backupccl: reuse test clusters between tests #46156

Open
pbardea opened this issue Mar 16, 2020 · 2 comments
Open

backupccl: reuse test clusters between tests #46156

pbardea opened this issue Mar 16, 2020 · 2 comments

Comments

@pbardea
Copy link
Contributor

pbardea commented Mar 16, 2020

I'm creating this issue to have a place to discuss possible ways to speedup backupccl tests.

Currently each backup test spins up and tears down a test cluster. This means that for a lot of tests we spend most of the time doing repeated work. I think we can speed up running make test PKG=./pkg/ccl/backupccl but doing something smarter here. Essentially we want to only have 1 test cluster instance that can be shared among all the tests. Most tests use backupRestoreTestSetup, so I think that it can be leveraged to manage a singleton instance of the cluster. The main work that needs to be done is ensuring that the data for each test doesn't conflict with eachother. After poking around at this, I think it can be done in 1 of 2 ways:

  1. Namespace the databases created by each tests to be prefixed with the testname. This ensures that there are no conflicts, but things may get a bit messy with nested tests which refer to databases that are created at a higher level test.

  2. Introduce a new guarantee that every test has to clean up after itself and drop any databases that it created. We can leverage the cleanup func provided by backupRestoreTestSetup to make this easier. This means that on most CREATE DATABASE request, we should expect to see a DROP DATABASE deferred.

Soliciting any additional thoughts/approaches we could use here.

cc @dt

Epic CRDB-7779

Jira issue: CRDB-5103

@mwang1026 mwang1026 added this to Triage in Disaster Recovery Backlog via automation May 28, 2020
@dt dt moved this from Triage to Testing in Disaster Recovery Backlog Jun 2, 2020
@github-actions
Copy link

We have marked this issue as stale because it has been inactive for
18 months. If this issue is still relevant, removing the stale label
or adding a comment will keep it active. Otherwise, we'll close it in
10 days to keep the issue queue tidy. Thank you for your contribution
to CockroachDB!

@dt dt added this to Triage in Test Engineering via automation Sep 14, 2023
@blathers-crl blathers-crl bot added the T-testeng TestEng Team label Sep 14, 2023
@blathers-crl
Copy link

blathers-crl bot commented Sep 14, 2023

cc @cockroachdb/test-eng

@dt dt moved this from Testing to Triage in Disaster Recovery Backlog Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants