MM-9664 Add invalidation metrics for store caches (#8340)
* Add invalidation metrics for store caches * Increment session invalidation metric * Fix tests
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fbff94f3be
Коммит
4a1802c039
@@ -13,7 +13,6 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store/sqlstore"
|
||||
)
|
||||
|
||||
func TestCreateChannel(t *testing.T) {
|
||||
@@ -909,7 +908,7 @@ func TestDeleteChannel(t *testing.T) {
|
||||
// successful delete by channel admin
|
||||
th.MakeUserChannelAdmin(user, publicChannel6)
|
||||
th.MakeUserChannelAdmin(user, privateChannel7)
|
||||
sqlstore.ClearChannelCaches()
|
||||
th.App.Srv.Store.Channel().ClearCaches()
|
||||
|
||||
_, resp = Client.DeleteChannel(publicChannel6.Id)
|
||||
CheckNoError(t, resp)
|
||||
@@ -960,7 +959,7 @@ func TestDeleteChannel(t *testing.T) {
|
||||
// // cannot delete by channel admin
|
||||
th.MakeUserChannelAdmin(user, publicChannel6)
|
||||
th.MakeUserChannelAdmin(user, privateChannel7)
|
||||
sqlstore.ClearChannelCaches()
|
||||
th.App.Srv.Store.Channel().ClearCaches()
|
||||
|
||||
_, resp = Client.DeleteChannel(publicChannel6.Id)
|
||||
CheckForbiddenStatus(t, resp)
|
||||
@@ -1001,7 +1000,7 @@ func TestDeleteChannel(t *testing.T) {
|
||||
// cannot delete by channel admin
|
||||
th.MakeUserChannelAdmin(user, publicChannel6)
|
||||
th.MakeUserChannelAdmin(user, privateChannel7)
|
||||
sqlstore.ClearChannelCaches()
|
||||
th.App.Srv.Store.Channel().ClearCaches()
|
||||
|
||||
_, resp = Client.DeleteChannel(publicChannel6.Id)
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
Ссылка в новой задаче
Block a user