Skip to content

Commit

Permalink
fix func args
Browse files Browse the repository at this point in the history
Signed-off-by: Priya Bibra <pbibra@slack-corp.com>
  • Loading branch information
pbibra committed Jul 21, 2023
1 parent 584247d commit 76db721
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"strconv"
"strings"
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -194,7 +195,7 @@ func TestUnShardedRecoveryAfterSharding(t *testing.T) {
require.NoError(t, err)

// now bring up the recovery keyspace and a tablet, letting it restore from backup.
recovery.RestoreTablet(t, localCluster, replica2, recoveryKS, "0", keyspaceName, commonTabletArg)
recovery.RestoreTablet(t, localCluster, replica2, recoveryKS, "0", keyspaceName, commonTabletAr, time.Time{})

Check failure on line 198 in go/test/endtoend/recovery/shardedrecovery/sharded_recovery_test.go

View workflow job for this annotation

GitHub Actions / Static Code Checks Etc

undeclared name: `commonTabletAr` (typecheck)

Check failure on line 198 in go/test/endtoend/recovery/shardedrecovery/sharded_recovery_test.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (shardedrecovery_stress_verticalsplit_heavy)

undefined: commonTabletAr

Check failure on line 198 in go/test/endtoend/recovery/shardedrecovery/sharded_recovery_test.go

View workflow job for this annotation

GitHub Actions / Run endtoend tests on Cluster (shardedrecovery_stress_verticalsplit_heavy)

undefined: commonTabletAr

// check the new replica does not have the data
cluster.VerifyRowsInTablet(t, replica2, keyspaceName, 2)
Expand Down Expand Up @@ -395,8 +396,8 @@ func TestShardedRecovery(t *testing.T) {
require.NoError(t, err)

// now bring up the recovery keyspace and 2 tablets, letting it restore from backup.
recovery.RestoreTablet(t, localCluster, replica2, recoveryKS, "-80", keyspaceName, commonTabletArg)
recovery.RestoreTablet(t, localCluster, replica3, recoveryKS, "80-", keyspaceName, commonTabletArg)
recovery.RestoreTablet(t, localCluster, replica2, recoveryKS, "-80", keyspaceName, commonTabletArg, time.Time{})
recovery.RestoreTablet(t, localCluster, replica3, recoveryKS, "80-", keyspaceName, commonTabletArg, time.Time{})

// check the new replicas have the correct number of rows
cluster.VerifyRowsInTablet(t, replica2, keyspaceName, shard0Count)
Expand Down
29 changes: 17 additions & 12 deletions go/test/endtoend/recovery/unshardedrecovery/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,23 @@ SET GLOBAL old_alter_table = ON;
}

// TestRecoveryImpl does following
// - create a shard with primary and replica1 only
// - run InitShardPrimary
// - insert some data
// - take a backup
// - insert more data on the primary
// - take another backup
// - create a recovery keyspace after first backup
// - bring up tablet_replica2 in the new keyspace
// - check that new tablet does not have data created after backup1
// - create second recovery keyspace after second backup
// - bring up tablet_replica3 in second keyspace
// - check that new tablet has data created after backup1 but not data created after backup2
// 1. create a shard with primary and replica1 only
// - run InitShardPrimary
// - insert some data
// 2. take a backup
// 3.create a recovery keyspace after first backup
// - bring up tablet_replica2 in the new keyspace
// - check that new tablet has data from backup1
// 4. insert more data on the primary
// 5. take another backup
// 6. create a recovery keyspace after second backup
// - bring up tablet_replica3 in the new keyspace
// - check that new tablet has data from backup2
// 7. insert more data on the primary
// 8. take another backup
// 9. create a recovery keyspace after second backup again
// - bring up tablet_replica4 in the new keyspace
// - check that new tablet has data from backup2 but not backup3
// - check that vtgate queries work correctly
func TestRecoveryImpl(t *testing.T) {
defer cluster.PanicHandler(t)
Expand Down

0 comments on commit 76db721

Please sign in to comment.