From 445f6ae93a9384ce0dc6d5734b762fafc8a52888 Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Thu, 23 Feb 2023 14:36:44 +0100 Subject: [PATCH] Fix UT --- roomserver/storage/shared/storage_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roomserver/storage/shared/storage_test.go b/roomserver/storage/shared/storage_test.go index 58724340c..3acb55a3a 100644 --- a/roomserver/storage/shared/storage_test.go +++ b/roomserver/storage/shared/storage_test.go @@ -3,7 +3,9 @@ package shared_test import ( "context" "testing" + "time" + "github.com/matrix-org/dendrite/internal/caching" "github.com/stretchr/testify/assert" "github.com/matrix-org/dendrite/internal/sqlutil" @@ -48,11 +50,14 @@ func mustCreateRoomserverDatabase(t *testing.T, dbType test.DBType) (*shared.Dat } assert.NoError(t, err) + cache := caching.NewRistrettoCache(8*1024*1024, time.Hour, false) + return &shared.Database{ DB: db, EventStateKeysTable: stateKeyTable, MembershipTable: membershipTable, Writer: sqlutil.NewExclusiveWriter(), + Cache: cache, }, func() { err := base.Close() assert.NoError(t, err)