Skip to content

Commit

Permalink
fix tempDir
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepymole committed Nov 23, 2021
1 parent c6cff73 commit 05704c9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions br/pkg/utils/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"context"
"encoding/json"
"fmt"
"os"
"testing"

"github.com/golang/protobuf/proto"
Expand Down Expand Up @@ -108,7 +107,7 @@ func TestLoadBackupMeta(t *testing.T) {
func TestLoadBackupMetaPartionTable(t *testing.T) {
t.Parallel()

testDir := os.TempDir()
testDir := t.TempDir()
store, err := storage.NewLocalStorage(testDir)
require.NoError(t, err)

Expand Down Expand Up @@ -259,7 +258,7 @@ func buildBenchmarkBackupmeta(b *testing.B, dbName string, tableCount, fileCount
}

func BenchmarkLoadBackupMeta64(b *testing.B) {
testDir := os.TempDir()
testDir := b.TempDir()
store, err := storage.NewLocalStorage(testDir)
require.NoError(b, err)

Expand Down Expand Up @@ -291,7 +290,7 @@ func BenchmarkLoadBackupMeta64(b *testing.B) {
}

func BenchmarkLoadBackupMeta1024(b *testing.B) {
testDir := os.TempDir()
testDir := b.TempDir()
store, err := storage.NewLocalStorage(testDir)
require.NoError(b, err)

Expand Down Expand Up @@ -323,7 +322,7 @@ func BenchmarkLoadBackupMeta1024(b *testing.B) {
}

func BenchmarkLoadBackupMeta10240(b *testing.B) {
testDir := os.TempDir()
testDir := b.TempDir()
store, err := storage.NewLocalStorage(testDir)
require.NoError(b, err)

Expand Down

0 comments on commit 05704c9

Please sign in to comment.