Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
test: use leveldb instead of badger
Browse files Browse the repository at this point in the history
Badger has issues on 32bit operating systems.
  • Loading branch information
Stebalien committed Jul 16, 2021
1 parent 8f12d79 commit 396063b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pstoreds/ds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
type datastoreFactory func(tb testing.TB) (ds.Batching, func())

var dstores = map[string]datastoreFactory{
"Badger": badgerStore,
// "Leveldb": leveldbStore,
//"Badger": badgerStore,
"Leveldb": leveldbStore,
}

func TestDsPeerstore(t *testing.T) {
Expand Down Expand Up @@ -87,6 +87,8 @@ func BenchmarkDsPeerstore(b *testing.B) {
}
}

// Doesn't work on 32bit because badger.
//lint:ignore U1000 disabled for now
func badgerStore(tb testing.TB) (ds.Batching, func()) {
dataPath, err := ioutil.TempDir(os.TempDir(), "badger")
if err != nil {
Expand All @@ -103,8 +105,7 @@ func badgerStore(tb testing.TB) (ds.Batching, func()) {
return store, closer
}

//lint:ignore U1000 disabled for now
func leveldbStore(tb testing.TB) (ds.TxnDatastore, func()) {
func leveldbStore(tb testing.TB) (ds.Batching, func()) {
dataPath, err := ioutil.TempDir(os.TempDir(), "leveldb")
if err != nil {
tb.Fatal(err)
Expand Down

0 comments on commit 396063b

Please sign in to comment.