summaryrefslogtreecommitdiff
path: root/plugins/kv/memory/storage_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/kv/memory/storage_test.go')
-rw-r--r--plugins/kv/memory/storage_test.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/kv/memory/storage_test.go b/plugins/kv/memory/storage_test.go
index 4b30460d..d3b24860 100644
--- a/plugins/kv/memory/storage_test.go
+++ b/plugins/kv/memory/storage_test.go
@@ -7,11 +7,26 @@ import (
"time"
"github.com/spiral/roadrunner/v2/plugins/kv"
+ "github.com/spiral/roadrunner/v2/plugins/logger"
"github.com/stretchr/testify/assert"
+ "go.uber.org/zap"
)
func initStorage() kv.Storage {
- return NewInMemoryStorage()
+ p := &Plugin{
+ stop: make(chan struct{}),
+ }
+ p.cfg = &Config{
+ Enabled: true,
+ Interval: 1,
+ }
+
+ l, _ := zap.NewDevelopment()
+ p.log = logger.NewZapAdapter(l)
+
+ go p.gc()
+
+ return p
}
func cleanup(t *testing.T, s kv.Storage, keys ...string) {