Skip to content

Commit

Permalink
account for not returning error from NewMutableTree and NewImmutableTree
Browse files Browse the repository at this point in the history
  • Loading branch information
faddat committed Nov 14, 2023
1 parent b634de6 commit 6cd13d6
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions store/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ func TestGetOrSetStoreCache(t *testing.T) {
mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize)

sKey := types.NewKVStoreKey("test")
tree, err := iavl.NewMutableTree(db, 100, false)
require.NoError(t, err)
tree := iavl.NewMutableTree(db, 100, false)
store := iavlstore.UnsafeNewStore(tree)
store2 := mngr.GetStoreCache(sKey, store)

Expand All @@ -33,8 +32,7 @@ func TestUnwrap(t *testing.T) {
mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize)

sKey := types.NewKVStoreKey("test")
tree, err := iavl.NewMutableTree(db, 100, false)
require.NoError(t, err)
tree := iavl.NewMutableTree(db, 100, false)
store := iavlstore.UnsafeNewStore(tree)
_ = mngr.GetStoreCache(sKey, store)

Expand All @@ -47,8 +45,7 @@ func TestStoreCache(t *testing.T) {
mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize)

sKey := types.NewKVStoreKey("test")
tree, err := iavl.NewMutableTree(db, 100, false)
require.NoError(t, err)
tree := iavl.NewMutableTree(db, 100, false)
store := iavlstore.UnsafeNewStore(tree)
kvStore := mngr.GetStoreCache(sKey, store)

Expand All @@ -74,8 +71,7 @@ func TestReset(t *testing.T) {
mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize)

sKey := types.NewKVStoreKey("test")
tree, err := iavl.NewMutableTree(db, 100, false)
require.NoError(t, err)
tree := iavl.NewMutableTree(db, 100, false)
store := iavlstore.UnsafeNewStore(tree)
store2 := mngr.GetStoreCache(sKey, store)

Expand All @@ -95,8 +91,7 @@ func TestCacheWrap(t *testing.T) {
mngr := cache.NewCommitKVStoreCacheManager(cache.DefaultCommitKVStoreCacheSize)

sKey := types.NewKVStoreKey("test")
tree, err := iavl.NewMutableTree(db, 100, false)
require.NoError(t, err)
tree := iavl.NewMutableTree(db, 100, false)
store := iavlstore.UnsafeNewStore(tree)

cacheWrapper := mngr.GetStoreCache(sKey, store).CacheWrap()
Expand Down

0 comments on commit 6cd13d6

Please sign in to comment.