Skip to content

Commit af0fed2

Browse files
yuhangcangqianAlex | Interchain Labs
andauthored
refactor: use t.TempDir() instead of os.MkdirTemp (#1059)
Signed-off-by: yuhangcangqian <[email protected]> Co-authored-by: Alex | Interchain Labs <[email protected]>
1 parent 70a1662 commit af0fed2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tree_random_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"encoding/base64"
55
"fmt"
66
"math/rand"
7-
"os"
87
"sort"
98
"strconv"
109
"strings"
@@ -95,9 +94,7 @@ func testRandomOperations(t *testing.T, randSeed int64) {
9594
}
9695

9796
// Use the same on-disk database for the entire run.
98-
tempdir, err := os.MkdirTemp("", "iavl")
99-
require.NoError(t, err)
100-
defer os.RemoveAll(tempdir)
97+
tempdir := t.TempDir()
10198

10299
levelDB, err := dbm.NewGoLevelDB("test", tempdir)
103100
require.NoError(t, err)

0 commit comments

Comments
 (0)