Skip to content

Commit

Permalink
Merge #44539
Browse files Browse the repository at this point in the history
44539: backupccl: remove legacy aux-dir check in tests r=dt a=dt

A long itme ago backup/restore used on-disk tempfiles and added this testing check
to ensure they were cleaned up but that has long since changed to in-memory and
this check is no longer relevant to backup/restore.

Release note: none

Co-authored-by: David Taylor <[email protected]>
  • Loading branch information
craig[bot] and dt committed Feb 4, 2020
2 parents 7e2f72f + 5db2559 commit 4c38ba1
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions pkg/ccl/backupccl/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,27 +112,8 @@ func backupRestoreTestSetupWithParams(
}

cleanupFn := func() {
tempDirs := []string{dir}
for _, s := range tc.Servers {
for _, e := range s.Engines() {
tempDirs = append(tempDirs, e.GetAuxiliaryDir())
}
}
tc.Stopper().Stop(context.TODO()) // cleans up in memory storage's auxiliary dirs
dirCleanupFn() // cleans up dir, which is the nodelocal:// storage

for _, temp := range tempDirs {
testutils.SucceedsSoon(t, func() error {
items, err := ioutil.ReadDir(temp)
if err != nil && !os.IsNotExist(err) {
t.Fatal(err)
}
for _, leftover := range items {
return errors.Errorf("found %q remaining in %s", leftover.Name(), temp)
}
return nil
})
}
}

return ctx, tc, sqlDB, dir, cleanupFn
Expand Down

0 comments on commit 4c38ba1

Please sign in to comment.