diff --git a/server/channels/api4/post_test.go b/server/channels/api4/post_test.go index d158a8d722..25fe9f13b2 100644 --- a/server/channels/api4/post_test.go +++ b/server/channels/api4/post_test.go @@ -165,7 +165,6 @@ func TestCreatePost(t *testing.T) { select { case event := <-WebSocketClient.EventChannel: if event.EventType() == model.WebsocketEventEphemeralMessage { - require.Equal(t, model.WebsocketEventEphemeralMessage, event.EventType()) eventsToGo = eventsToGo - 1 } case <-timeout: @@ -3129,7 +3128,7 @@ func TestWebHubMembership(t *testing.T) { } func TestWebHubCloseConnOnDBFail(t *testing.T) { - t.Skip("https://mattermost.atlassian.net/browse/MM-61780") + t.Skip("MM-61780") th := Setup(t).InitBasic() defer func() { th.TearDown() diff --git a/server/channels/app/platform/options.go b/server/channels/app/platform/options.go index b5e46c1c9b..519e917c53 100644 --- a/server/channels/app/platform/options.go +++ b/server/channels/app/platform/options.go @@ -44,6 +44,8 @@ func StoreOverride(override any) Option { } } +// StoreOverrideWithCache is a test option to construct the app with the store layer +// wrapped on top of the store that is passed. func StoreOverrideWithCache(override store.Store) Option { return func(ps *PlatformService) error { ps.newStore = func() (store.Store, error) { @@ -51,6 +53,9 @@ func StoreOverrideWithCache(override store.Store) Option { if err != nil { return nil, err } + // Clearing all the caches because the in-mem data + // is persisted in case of Redis. + lcl.Invalidate() return lcl, nil }