Wait a bit before closing Dendrite to let components process events

This commit is contained in:
Till Faelligen 2023-02-06 11:18:19 +01:00
parent da2e184072
commit 50f8466290
No known key found for this signature in database
GPG key ID: ACCDC9606D472758

View file

@ -5,6 +5,7 @@ import (
"net/http"
"net/http/httptest"
"testing"
"time"
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
"github.com/matrix-org/dendrite/federationapi"
@ -151,7 +152,10 @@ func TestPurgeRoom(t *testing.T) {
test.WithAllDatabases(t, func(t *testing.T, dbType test.DBType) {
base, baseClose := testrig.CreateBaseDendrite(t, dbType)
defer baseClose()
t.Cleanup(func() {
time.Sleep(time.Millisecond * 50)
baseClose()
})
fedClient := base.CreateFederationClient()
rsAPI := roomserver.NewInternalAPI(base)