Skip to content

Commit 20e2332

Browse files
committed
Remove unused imports and update store creation
1 parent f798a3a commit 20e2332

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

adapter/test_util.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import (
44
"context"
55
"log"
66
"net"
7-
"os"
8-
"path/filepath"
97
"strconv"
108
"sync"
119
"sync/atomic"
@@ -19,7 +17,6 @@ import (
1917
pb "github.com/bootjp/elastickv/proto"
2018
"github.com/bootjp/elastickv/store"
2119
"github.com/cockroachdb/errors"
22-
"github.com/google/uuid"
2320
"github.com/hashicorp/go-hclog"
2421
"github.com/hashicorp/raft"
2522
"github.com/stretchr/testify/assert"
@@ -262,11 +259,7 @@ func setupNodes(t *testing.T, ctx context.Context, n int, ports []portsAdress, c
262259
var lc net.ListenConfig
263260

264261
for i := 0; i < n; i++ {
265-
rnd := uuid.New()
266-
path := filepath.Join(os.TempDir(), rnd.String())
267-
require.NoError(t, os.Mkdir(path, 0755)) //nolint:mnd
268-
st, err := store.NewBoltStore(filepath.Join(path, "raft.db"))
269-
require.NoError(t, err)
262+
st := store.NewRbMemoryStore()
270263
trxSt := store.NewMemoryStoreDefaultTTL()
271264
fsm := kv.NewKvFSM(st, trxSt)
272265

0 commit comments

Comments
 (0)